-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
.eslintrc.js
71 lines (66 loc) · 2.7 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
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module'
},
extends: ['prettier', 'prettier/@typescript-eslint', 'plugin:react/recommended', 'plugin:jest/recommended'],
plugins: ['@typescript-eslint', 'markdown', 'json', 'prettier', 'react', 'react-hooks', 'jest'],
env: {
es6: true,
node: true,
browser: true
},
globals: {
document: false,
navigator: false,
window: false
},
settings: {
react: {
version: 'detect'
}
},
rules: {
'no-console': 'error',
'sort-imports': ['error', { memberSyntaxSortOrder: ['none', 'all', 'single', 'multiple'], ignoreCase: true }],
quotes: 'off',
'prettier/prettier': ['error', { singleQuote: true, printWidth: 120 }],
'@typescript-eslint/adjacent-overload-signatures': 'error',
'@typescript-eslint/array-type': ['error', { default: 'generic' }],
'@typescript-eslint/ban-types': 'error',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/class-name-casing': 'error',
'@typescript-eslint/consistent-type-assertions': 'error',
'@typescript-eslint/explicit-function-return-type': ['error', { allowExpressions: true }],
'@typescript-eslint/explicit-member-accessibility': 'error',
'@typescript-eslint/indent': 'off',
'@typescript-eslint/interface-name-prefix': 'error',
'@typescript-eslint/member-delimiter-style': 'error',
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-inferrable-types': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-non-null-assertion': 'error',
'@typescript-eslint/no-parameter-properties': 'error',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/prefer-namespace-keyword': 'error',
'@typescript-eslint/triple-slash-reference': 'error',
'@typescript-eslint/type-annotation-spacing': 'error',
'jest/consistent-test-it': ['error', { fn: 'test' }],
'jest/no-large-snapshots': ['error', { maxSize: 0 }],
'jest/no-test-prefixes': 'error',
'jest/valid-describe': 'error',
'jest/valid-expect-in-promise': 'error',
'react/display-name': 'off',
'react/no-find-dom-node': 'warn',
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error'
},
overrides: [{ files: ['*.js'], rules: { '@typescript-eslint/explicit-function-return-type': 'off' } }]
};