-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslintrc.js
93 lines (87 loc) · 2.53 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
81
82
83
84
85
86
87
88
89
90
91
92
93
module.exports = {
extends: ['gsandf'],
env: {
browser: true,
es6: true,
node: true
},
globals: {
document: 'readonly',
navigator: 'readonly',
window: 'readonly'
},
parserOptions: {
ecmaVersion: 2020,
ecmaFeatures: {
jsx: true
},
sourceType: 'module'
},
plugins: ['react', 'react-hooks', 'jsx-a11y'],
settings: {
react: {
version: 'latest'
}
},
rules: {
'react/jsx-no-bind': [
'warn',
{
allowArrowFunctions: true,
allowBind: false,
ignoreRefs: true
}
],
'jsx-a11y/accessible-emoji': 'warn',
'jsx-a11y/alt-text': 'warn',
'jsx-a11y/anchor-has-content': 'warn',
'jsx-a11y/aria-activedescendant-has-tabindex': 'warn',
'jsx-a11y/aria-props': 'warn',
'jsx-a11y/aria-proptypes': 'warn',
'jsx-a11y/aria-role': 'warn',
'jsx-a11y/aria-unsupported-elements': 'warn',
'jsx-a11y/heading-has-content': 'warn',
'jsx-a11y/iframe-has-title': 'warn',
'jsx-a11y/img-redundant-alt': 'warn',
'jsx-a11y/no-redundant-roles': 'warn',
'jsx-a11y/role-has-required-aria-props': 'warn',
'jsx-a11y/role-supports-aria-props': 'warn',
'jsx-quotes': ['error', 'prefer-double'],
'react-hooks/exhaustive-deps': 'warn',
'react-hooks/rules-of-hooks': 'error',
'react/jsx-boolean-value': 'error',
'react/jsx-curly-spacing': ['error', 'never'],
'react/jsx-equals-spacing': ['error', 'never'],
'react/jsx-indent-props': ['error', 2],
'react/jsx-indent': ['error', 2],
'react/jsx-key': [
'error',
{
checkFragmentShorthand: true,
checkKeyMustBeforeSpread: false
}
],
'react/jsx-no-comment-textnodes': 'error',
'react/jsx-no-duplicate-props': 'error',
'react/jsx-no-target-blank': 'error',
'react/jsx-no-undef': 'error',
'react/jsx-pascal-case': 'error',
'react/jsx-tag-spacing': 'error',
'react/jsx-uses-react': 'error',
'react/jsx-uses-vars': 'error',
'react/no-danger-with-children': 'error',
'react/no-deprecated': 'warn',
'react/no-did-update-set-state': 'error',
'react/no-direct-mutation-state': 'error',
'react/no-is-mounted': 'error',
'react/no-unescaped-entities': 'off',
'react/no-unknown-property': 'error',
'react/no-unused-prop-types': 'error',
'react/prefer-es6-class': 'error',
'react/prop-types': 'error',
'react/react-in-jsx-scope': 'error',
'react/require-render-return': 'error',
'react/self-closing-comp': 'error',
'react/style-prop-object': 'error'
}
};