-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
104 lines (104 loc) · 2.48 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
module.exports = {
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
root: true,
env: {
'es2024': true,
'commonjs': true,
'shared-node-browser': true
},
globals: {
process: true
},
ignorePatterns: [
'**/docs/*'
],
rules: {
'array-bracket-spacing': ['error', 'never'],
'arrow-spacing': 'error',
'block-scoped-var': 'error',
'block-spacing': 'error',
'brace-style': ['error', '1tbs'],
'camelcase': ['error', {
properties: 'never'
}],
'constructor-super': 'error',
'curly': 'error',
'eol-last': 'error',
'eqeqeq': ['error', 'smart'],
'func-names': ['error', 'as-needed'],
'func-style': ['error', 'declaration', {
allowArrowFunctions: true
}],
'handle-callback-err': 'error',
'indent': ['error', 'tab', {
SwitchCase: 1,
ObjectExpression: 'first',
MemberExpression: 1,
ignoredNodes: ['TemplateLiteral *']
}],
'keyword-spacing': ['error', {
before: true,
after: true,
}],
'max-depth': ['warn', 3],
'max-len': ['error', {
code: 120,
ignoreComments: true,
ignoreTrailingComments: true,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true
}],
'max-statements': ['warn', 30],
'new-cap': 'warn',
'no-class-assign': 'error',
'no-cond-assign': ['error', 'except-parens'],
'no-const-assign': 'error',
'no-dupe-class-members': 'error',
'no-extend-native': 'error',
'no-extra-parens': ['error', 'functions'],
'no-mixed-spaces-and-tabs': 'error',
'no-multi-spaces': ['error', {
exceptions: {
VariableDeclarator: true,
}
}],
'no-nested-ternary': 'error',
'no-prototype-builtins': 'off',
'no-this-before-super': 'error',
'no-trailing-spaces': 'error',
'no-undef': 'error',
'no-underscore-dangle': 'off',
'no-use-before-define': ['error', {
functions: false,
classes: false
}],
'no-whitespace-before-property': 'error',
'no-var': 'error',
'object-curly-spacing': ['error', 'always'],
'prefer-const': 'error',
'quotes': ['error', 'single', {
avoidEscape: true,
allowTemplateLiterals: true
}],
'semi': ['error', 'always'],
'space-in-parens': ['error', 'never'],
'space-infix-ops': 'error',
'space-unary-ops': ['error', {
words: true,
nonwords: false
}],
'strict': ['error', 'global'],
'valid-jsdoc': 'off'
},
overrides: [
{
files: ['*.spec.js', '*.test.js', '*.e2e.js', '*.integration.js'],
rules: {
'func-names': 'off'
}
}
]
};