-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
68 lines (68 loc) · 1.72 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
module.exports = {
env: {
es2021: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
'plugin:import/recommended',
'plugin:prettier/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json',
},
plugins: [
'@typescript-eslint',
'filenames',
'implicit-dependencies',
'no-only-tests',
],
ignorePatterns: [
'dist',
'cypress/**/*.js',
'cypress/**/*.ts',
'node_modules',
'**/*.d.ts',
'**/specs/**/index.ts',
],
settings: {
'import/resolver': {
typescript: {},
},
},
rules: {
'no-only-tests/no-only-tests': 'error',
'filenames/match-regex': ['error', '^[a-z0-9-.]+$', true],
complexity: ['warn', 15],
'object-curly-spacing': ['error', 'always'],
'linebreak-style': ['error', 'unix'],
quotes: [
'error',
'single',
{ avoidEscape: true, allowTemplateLiterals: true },
],
semi: ['error', 'never'],
'@typescript-eslint/prefer-ts-expect-error': 'warn',
'@typescript-eslint/ban-ts-comment': [
'warn',
{
'ts-expect-error': 'allow-with-description',
'ts-ignore': 'allow-with-description',
minimumDescriptionLength: 10,
},
],
'no-unsafe-optional-chaining': 'warn',
'@typescript-eslint/no-empty-interface': 'warn',
'@typescript-eslint/no-namespace': 'warn',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/consistent-type-exports': 'error',
'import/default': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'import/named': 0,
},
}