-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
80 lines (79 loc) · 2.07 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
module.exports = {
env: {
browser: true,
es6: true,
jest: true
},
extends: [
'airbnb',
'plugin:react/recommended',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/eslint-recommended'
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 2018,
sourceType: 'module'
},
plugins: ['react', '@typescript-eslint', 'react-hooks'],
rules: {
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
mjs: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never'
}
],
'react/jsx-filename-extension': [1, { extensions: ['.ts', '.tsx'] }],
'react/prefer-stateless-function': 0,
'react/self-closing-comp': 1,
'react/prop-types': 0,
'react/jsx-one-expression-per-line': 0,
'react-hooks/rules-of-hooks': 2,
'react-hooks/exhaustive-deps': 1,
'react/destructuring-assignment': 0,
'react/jsx-fragments': 0,
'import/prefer-default-export': 0,
'@typescript-eslint/explicit-function-return-type': 1,
'@typescript-eslint/no-empty-interface': 0,
'@typescript-eslint/interface-name-prefix': [0, { prefixWithI: 'always', allowUnderscorePrefix: true }],
'comma-dangle': 0,
'arrow-body-style': 0,
'no-unused-expressions': ['error', { allowShortCircuit: true, allowTernary: true }],
'jsx-a11y/aria-role': [2, { ignoreNonDOM: true }],
'react/jsx-boolean-value': 0,
'react/no-array-index-key': 1
},
settings: {
'import/resolver': {
node: {
paths: ['src'],
extensions: ['.js', '.jsx', '.ts', '.tsx']
}
}
},
overrides: [
{
files: ['./src/setupTests.ts', 'src/**/*.tsx'],
rules: {
'import/no-extraneous-dependencies': [
0,
{ devDependencies: false, optionalDependencies: false, peerDependencies: false }
]
}
}
]
};