-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslintrc.js
67 lines (67 loc) · 1.55 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
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'standard',
],
rules: {
semi: ['error', 'always'],
'space-before-function-paren': ['error', 'never'],
'comma-dangle': ['error', 'always-multiline'],
'no-var': ['error'],
'no-console': ['error', { allow: ['info', 'warn', 'error'] }],
'require-await': ['error'],
'max-len': ['error', { code: 120 }],
// 'max-lines': ['error', 200],
// 'max-lines-per-function': ['error', 20],
// complexity: ['error', 6],
'max-nested-callbacks': ['error', 2],
'max-depth': ['error', 3],
'max-params': ['error', 3],
indent: ['error', 2, {
ignoredNodes: ['PropertyDefinition'],
SwitchCase: 1,
}],
},
env: {
browser: true,
node: true,
},
overrides: [
{
files: [
'*.ts',
'*.tsx',
],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
'no-useless-constructor': 'off',
'@typescript-eslint/no-useless-constructor': 'error',
},
},
{
files: [
'*.test.js',
'*.test.mjs',
'*.test.ts',
'*.test.jsx',
'*.test.tsx',
],
extends: [
'plugin:mocha/recommended',
],
rules: {
'mocha/no-mocha-arrows': 'off',
'mocha/no-hooks-for-single-case': 'off',
'max-nested-callbacks': 'off',
'dot-notation': 'off',
},
env: {
mocha: true,
},
},
],
};