-
Notifications
You must be signed in to change notification settings - Fork 18
/
.eslintrc.js
58 lines (57 loc) · 1.46 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
const IGNORE = 0;
const WARNING = 1;
const ERROR = 2;
module.exports = {
parser: '@typescript-eslint/parser',
env: {
es6: true,
'jest/globals': true,
},
extends: [
'airbnb',
'standard',
'standard-react',
'prettier',
'prettier/flowtype',
'prettier/react',
'prettier/standard',
'plugin:jest/recommended',
'plugin:@typescript-eslint/recommended',
],
plugins: ['jest', 'react', 'react-hooks'],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module', // Allows for the use of imports
},
rules: {
'react-hooks/exhaustive-deps': WARNING,
'react-hooks/rules-of-hooks': ERROR,
'react/jsx-no-bind': [IGNORE],
'import/extensions': [IGNORE],
'react/jsx-fragments': [WARNING, 'syntax'],
'react/jsx-filename-extension': [IGNORE],
'react/state-in-constructor': [WARNING, 'never'],
'import/no-extraneous-dependencies': [IGNORE],
'import/no-unresolved': [IGNORE],
'import/prefer-default-export': [IGNORE],
'@typescript-eslint/explicit-function-return-type': ERROR,
'@typescript-eslint/no-unused-vars': [ERROR, { ignoreRestSiblings: true }],
'react/jsx-props-no-spreading': [IGNORE],
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
overrides: [
{
files: ['**/*.tsx'],
rules: {
'react/prop-types': 'off',
'react/static-property-placement': 'off',
},
},
],
};