-
Notifications
You must be signed in to change notification settings - Fork 555
/
.eslintrc.js
79 lines (79 loc) · 2.88 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
module.exports = {
env: {
browser: true,
es6: true,
node: true,
},
ignorePatterns: ['node_modules', '**/__mocks__*', '**/__tests__*', '**/*.spec.*'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['react', 'prettier', '@typescript-eslint', 'import'],
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier',
'plugin:prettier/recommended',
'plugin:import/recommended',
'plugin:import/typescript'
],
rules: {
'@typescript-eslint/interface-name-prefix': ['warn', { prefixWithI: 'always' }],
'import/prefer-default-export': 'off',
'import/no-cycle': 'warn',
'react/prop-types': 'off',
'react/state-in-constructor': 'off',
'react/static-property-placement': ['error', 'static public field'],
'react/destructuring-assignment': ['warn', 'always', { ignoreClassFields: true }],
'no-nested-ternary': 'off',
'@typescript-eslint/restrict-template-expressions': 'warn',
// '@typescript-eslint/adjacent-overload-signatures': 'warn',
// '@typescript-eslint/array-type': 'warn',
// '@typescript-eslint/ban-types': 'warn',
// '@typescript-eslint/class-name-casing': 'warn',
// '@typescript-eslint/consistent-type-assertions': 'warn',
// '@typescript-eslint/indent': ['off', 2],
// '@typescript-eslint/member-delimiter-style': [
// 'off',
// {
// multiline: {
// delimiter: 'none',
// requireLast: true,
// },
// singleline: {
// delimiter: 'semi',
// requireLast: false,
// },
// },
// ],
// '@typescript-eslint/member-ordering': 'off',
// '@typescript-eslint/no-empty-function': 'warn',
// '@typescript-eslint/no-empty-interface': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
// '@typescript-eslint/no-misused-new': 'warn',
// '@typescript-eslint/no-namespace': 'warn',
// '@typescript-eslint/no-parameter-properties': 'off',
// '@typescript-eslint/no-this-alias': 'warn',
// '@typescript-eslint/no-use-before-define': 'off',
// '@typescript-eslint/no-var-requires': 'warn',
// '@typescript-eslint/prefer-for-of': 'warn',
// '@typescript-eslint/prefer-function-type': 'warn',
// '@typescript-eslint/prefer-namespace-keyword': 'warn',
// '@typescript-eslint/quotes': ['warn', 'single'],
// '@typescript-eslint/semi': ['off', null],
// '@typescript-eslint/triple-slash-reference': 'warn',
// '@typescript-eslint/type-annotation-spacing': 'off',
// '@typescript-eslint/unified-signatures': 'warn',
// 'arrow-parens': ['off', 'as-needed'],
},
settings: {
react: {
version: 'detect',
},
},
};