-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
58 lines (58 loc) · 1.51 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
module.exports = {
env: {
browser: true,
es2021: true,
},
ignorePatterns: ['!src/**/*'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
// override max lines rule for test files
overrides: [
{
files: ['**/*.test.ts'],
rules: {
'max-lines-per-function': 'off',
'max-nested-callbacks': 'off',
'max-statements': 'off',
},
},
],
rules: {
'@typescript-eslint/no-unused-vars': 2,
'@typescript-eslint/no-explicit-any': 2,
'@typescript-eslint/explicit-module-boundary-types': 2,
'@typescript-eslint/semi': 2,
semi: 2,
'no-unused-vars': 2,
'no-console': 2,
'max-depth': [2, { max: 3 }],
'max-lines-per-function': [
2,
{ max: 40, skipComments: true, skipBlankLines: true },
],
'max-nested-callbacks': [2, { max: 3 }],
'max-statements': [2, { max: 9 }],
'max-params': [2, { max: 4 }],
'no-else-return': 2,
'no-implicit-globals': 2,
'no-lonely-if': 2,
'no-multi-spaces': 2,
'no-prototype-builtins': 2,
'no-trailing-spaces': [2, { ignoreComments: false }],
'no-undef': 2,
'no-unneeded-ternary': 2,
'no-unused-expressions': 2,
'no-useless-catch': 2,
'no-useless-computed-key': 2,
'no-useless-return': 2,
'no-var': 2,
'no-warning-comments': 1,
'object-shorthand': [2, 'always', { avoidQuotes: true }],
'prefer-const': 2,
},
};