-
-
Notifications
You must be signed in to change notification settings - Fork 187
/
.eslintrc.js
72 lines (72 loc) · 2.01 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
module.exports = {
extends: [
'plugin:@typescript-eslint/recommended',
'airbnb',
'plugin:prettier/recommended',
'plugin:react-hooks/recommended'
],
parser: '@typescript-eslint/parser',
plugins: ['react', 'prettier'],
env: {
browser: true,
es6: true,
jest: true
},
rules: {
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_\\d*$'
}
],
'import/extensions': ['error', { js: 'never', ts: 'never', tsx: 'never' }],
'import/no-unresolved': [
'error',
// TODO: Remove ../../test/utils when TypeScript migration is complete
{ ignore: ['react95', '../../test/utils'] }
],
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
'import/prefer-default-export': 'off',
'jsx-a11y/label-has-associated-control': ['error', { assert: 'either' }],
'jsx-a11y/label-has-for': 'off',
'no-nested-ternary': 'off',
'prettier/prettier': 'error',
'react/forbid-prop-types': 'off',
'react/jsx-filename-extension': [
'warn',
{ extensions: ['.js', '.jsx', '.tsx'] }
],
'react/jsx-props-no-spreading': 'off',
'react/no-array-index-key': 'off',
'react/prop-types': 'off',
'react/require-default-props': 'off',
'react/static-property-placement': ['error', 'static public field']
},
overrides: [
{
files: ['*.spec.@(js|jsx|ts|tsx)', '*.stories.@(js|jsx|ts|tsx)'],
rules: {
'no-console': 'off'
}
},
{
files: ['*.@(ts|tsx)'],
rules: {
// This is handled by @typescript-eslint/no-unused-vars
'no-undef': 'off'
}
}
],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx']
},
'import/resolver': {
typescript: {}
}
}
};