-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path.eslintrc.js
More file actions
83 lines (83 loc) · 2.5 KB
/
Copy path.eslintrc.js
File metadata and controls
83 lines (83 loc) · 2.5 KB
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
// This is the primary JavaScript linting rules for the entire
// project. In a few places, some of these rules are extended
// or overridden for a particular subset of the project. See
// other .eslintrc.js files for those rules.
module.exports = {
globals: {},
plugins: ['@typescript-eslint', 'jsx-a11y', 'react-hooks'],
extends: [
'plugin:react/recommended',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:jsx-a11y/recommended',
'plugin:react-hooks/recommended',
],
env: {
browser: true,
node: true,
es6: true,
},
settings: {
react: {
version: 'detect',
},
},
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
rules: {
'array-bracket-spacing': ['error', 'never'],
'brace-style': ['error', '1tbs', {allowSingleLine: true}],
'comma-dangle': 'off',
curly: 'error',
'dot-location': ['error', 'property'],
'eol-last': 'error',
eqeqeq: 'error',
'jsx-quotes': 'error',
'keyword-spacing': 'error',
'no-array-constructor': 'off',
'@typescript-eslint/no-array-constructor': 'error',
'no-console': 'off',
'no-duplicate-imports': 'error',
'no-empty': 'off',
'no-eval': 'error',
'no-ex-assign': 'off',
'no-extra-boolean-cast': 'off',
'no-implicit-globals': 'error',
'no-new-object': 'error',
'no-trailing-spaces': 'error',
'no-undef': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error', {args: 'none'}],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-require-imports': 'off',
'no-useless-escape': 'off',
'no-with': 'error',
'object-curly-spacing': 'off',
'react/react-in-jsx-scope': 'off',
'react/button-has-type': 'error',
'react/display-name': 'off',
'react/jsx-closing-bracket-location': 'error',
'react/jsx-curly-spacing': 'error',
'react/jsx-first-prop-new-line': ['error', 'multiline'],
'react/jsx-indent-props': ['error', 2],
'react/jsx-key': 'off',
'react/jsx-no-target-blank': 'off',
'react/jsx-wrap-multilines': 'error',
'react/no-danger': 'error',
'react/no-find-dom-node': 'off',
'react/no-render-return-value': 'off',
'react/no-string-refs': 'off',
'react/no-unescaped-entities': 'off',
'react/prop-types': 'off',
'react/self-closing-comp': 'error',
semi: 'off',
'space-before-blocks': 'error',
strict: 'off',
'jsx-a11y/no-onchange': 0,
},
};