-
Notifications
You must be signed in to change notification settings - Fork 14
/
.eslintrc.js
56 lines (55 loc) · 1.56 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
module.exports = {
ignorePatterns: ['/dist', '/data/in', '/data/out'],
extends: [
'alloy',
'alloy/react',
'alloy/typescript',
'plugin:react-hooks/recommended',
],
env: {
browser: true,
es2020: true,
},
rules: {
'getter-return': 'off',
'no-restricted-globals': ['error', ...require('confusing-browser-globals')],
'complexity': 'off',
'max-depth': 'off',
'max-nested-callbacks': 'off',
'max-params': 'off',
'prefer-const': ['error', { 'destructuring': 'all' }],
'prefer-exponentiation-operator': 'error',
'react/jsx-uses-react': 'off',
'react/no-children-prop': 'off',
'@typescript-eslint/consistent-type-assertions': 'off',
'@typescript-eslint/consistent-type-imports': 'off', // should not be used with 'verbatimModuleSyntax'
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-require-imports': 'off',
// stylistic
'no-multi-spaces': ['error', { ignoreEOLComments: true }],
'comma-dangle': ['error', 'always-multiline'],
'quotes': ['error', 'single', { allowTemplateLiterals: true }],
'semi': 'error',
},
settings: {
react:{
version: 'detect',
},
},
overrides: [{
files: ['*.ts', '*.tsx'],
parserOptions: {
projectService: true,
},
rules: {
'@typescript-eslint/prefer-nullish-coalescing': ['error', { ignoreMixedLogicalExpressions: true }],
'@typescript-eslint/require-array-sort-compare': 'error',
},
}, {
files: ['*.js'],
excludedFiles: 'src/*',
env: {
node: true,
},
}],
};