-
Notifications
You must be signed in to change notification settings - Fork 7
/
.eslintrc.js
118 lines (115 loc) · 2.94 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'prettier',
'plugin:import/recommended',
'plugin:import/typescript',
],
plugins: ['@typescript-eslint', 'import', 'react'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.eslint.json',
tsconfigRootDir: __dirname,
},
env: {
jest: true,
browser: true,
es6: true,
node: true,
},
settings: {
react: {
version: 'detect',
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
alwaysTryTypes: true,
},
},
},
rules: {
camelcase: 2,
'no-lonely-if': 2,
'no-tabs': 2,
'no-unneeded-ternary': 2,
'prefer-exponentiation-operator': 2,
'prefer-object-spread': 2,
'unicode-bom': 2,
'no-useless-rename': 2,
'no-var': 2,
'object-shorthand': 2,
'prefer-const': 2,
'no-useless-constructor': 2,
'no-useless-computed-key': 2,
'no-duplicate-imports': 2,
'prefer-template': 2,
'no-use-before-define': 2,
'no-undef-init': 2,
'no-shadow': 2,
'require-await': 2,
'no-useless-return': 2,
'no-useless-concat': 2,
'no-return-assign': 2,
'no-return-await': 2,
'no-template-curly-in-string': 2,
'no-unreachable-loop': 2,
'require-atomic-updates': 2,
'consistent-return': 2,
curly: 2,
eqeqeq: 2,
'no-else-return': 2,
'no-extra-bind': 2,
'no-lone-blocks': 2,
'no-self-compare': 2,
'no-sequences': 2,
'arrow-body-style': 2,
'no-console': 1,
'import/no-unresolved': 2,
'import/no-self-import': 2,
'import/first': 2,
'import/newline-after-import': 2,
'import/no-named-default': 2,
'import/dynamic-import-chunkname': 2,
'import/no-unused-modules': [
0,
{
missingExports: false,
unusedExports: true,
ignoreExports: ['**/*/index.js'],
},
],
'import/no-extraneous-dependencies': 2,
'import/order': [
2,
{
groups: ['builtin', 'external', 'parent', 'sibling', 'index'],
'newlines-between': 'always',
},
],
'import/named': 2,
'react/prop-types': 0,
'react/no-array-index-key': 0,
'react/button-has-type': 2,
'react/no-access-state-in-setstate': 2,
'react/no-redundant-should-component-update': 2,
'react/no-unsafe': 2,
'react/no-unused-state': 2,
'react/self-closing-comp': 2,
'react/style-prop-object': 2,
'react/jsx-boolean-value': 2,
'react/jsx-fragments': 2,
'react/jsx-no-script-url': 2,
'react/jsx-no-useless-fragment': 2,
'react/jsx-pascal-case': 2,
'react/jsx-filename-extension': [2, { extensions: ['.jsx', '.tsx'] }],
'react-hooks/exhaustive-deps': 0,
},
};