-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
66 lines (66 loc) · 1.82 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
module.exports = {
extends: ['plugin:import/errors'],
overrides: [
{
files: ['*.ts', '*.tsx'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
'plugin:react/recommended'
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true
}
},
plugins: ['@typescript-eslint', 'react-hooks', 'jest', 'react'],
rules: {
indent: 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
vars: 'all',
args: 'after-used',
ignoreRestSiblings: true,
argsIgnorePattern: '^_'
}
],
'@typescript-eslint/indent': ['off'],
'react/prop-types': ['off'],
'@typescript-eslint/explicit-function-return-type': ['off'],
'@typescript-eslint/no-explicit-any': ['off'],
'@typescript-eslint/no-use-before-define': ['off'],
'@typescript-eslint/explicit-member-accessibility': ['off'],
'@typescript-eslint/no-empty-interface': ['off'],
'@typescript-eslint/explicit-module-boundary-types': ['off'],
'react-hooks/rules-of-hooks': 'warn',
'react-hooks/exhaustive-deps': 'warn',
'jest/prefer-expect-assertions': [
'error',
{ onlyFunctionsWithAsyncKeyword: true }
],
'import/named': ['off'] // https://github.com/typescript-eslint/typescript-eslint/issues/154
}
},
{
env: {
browser: true,
node: true,
es6: true
},
files: ['*.js'],
extends: ['eslint:recommended'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2017
}
}
],
settings: {
react: {
version: 'detect'
}
}
};