-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
executable file
·136 lines (135 loc) · 4.64 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
module.exports = {
parser: '@babel/eslint-parser',
parserOptions: { ecmaFeatures: { jsx: true } },
extends: ['airbnb', 'plugin:react/recommended', 'plugin:storybook/recommended'],
plugins: ['react', 'react-hooks', 'fp',
// '@spothero/eslint-plugin-spothero',
],
settings: { 'import/resolver': { node: { extensions: ['.js', '.jsx'] } } },
globals: {
document: true,
window: true,
localStorage: true,
Fragment: true,
},
overrides: [{
files: ['**/*.test.js', '**/*.test.jsx'],
env: { jest: true },
plugins: ['jest'],
}],
rules: {
// '@spothero/spothero/ternary-parentheses': 'error',
'arrow-parens': ['error', 'always'],
'consistent-return': 'off',
// 'fp/no-class': 'error',
'fp/no-delete': 'error',
'func-names': ['error', 'as-needed'],
'import/exports-last': 'error',
'import/group-exports': 'off',
'import/no-cycle': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-named-as-default': 2,
'import/order': ['error', {
'newlines-between': 'always',
groups: [['builtin', 'external'], ['internal', 'parent', 'sibling', 'index']],
}],
'import/prefer-default-export': 'off',
'jest/expect-expect': 'off',
'jest/no-disabled-tests': 'off',
'jsx-a11y/accessible-emoji': 'off',
'jsx-a11y/alt-text': 'off',
'jsx-a11y/anchor-has-content': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'jsx-a11y/aria-activedescendant-has-tabindex': 'off',
'jsx-a11y/aria-props': 'off',
'jsx-a11y/aria-proptypes': 'off',
'jsx-a11y/aria-role': 'off',
'jsx-a11y/aria-unsupported-elements': 'off',
'jsx-a11y/autocomplete-valid': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/heading-has-content': 'off',
'jsx-a11y/html-has-lang': 'off',
'jsx-a11y/iframe-has-title': 'off',
'jsx-a11y/img-redundant-alt': 'off',
'jsx-a11y/interactive-supports-focus': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'jsx-a11y/media-has-caption': 'off',
'jsx-a11y/mouse-events-have-key-events': 'off',
'jsx-a11y/no-access-key': 'off',
'jsx-a11y/no-autofocus': 'off',
'jsx-a11y/no-distracting-elements': 'off',
'jsx-a11y/no-interactive-element-to-noninteractive-role': 'off',
'jsx-a11y/no-noninteractive-element-interactions': 'off',
'jsx-a11y/no-noninteractive-element-to-interactive-role': 'off',
'jsx-a11y/no-noninteractive-tabindex': 'off',
'jsx-a11y/no-onchange': 'off',
'jsx-a11y/no-redundant-roles': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'jsx-a11y/role-has-required-aria-props': 'off',
'jsx-a11y/role-supports-aria-props': 'off',
'jsx-a11y/scope': 'off',
'jsx-a11y/tabindex-no-positive': 'off',
'max-len': 'off',
'max-params': ['error', 3],
'no-await-in-loop': 'off',
'no-cond-assign': 'off',
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-continue': 'off',
'no-delete-var': 'error',
'no-empty': 0,
'no-extra-boolean-cast': 0,
'no-param-reassign': ['error', {
props: true,
ignorePropertyModificationsFor: ['state'],
}],
'no-plusplus': 'off',
'no-prototype-builtins': 'off',
'no-restricted-properties': 'off',
'no-restricted-syntax': 'off',
'no-unused-vars': ['error', {
varsIgnorePattern: 'Fragment',
ignoreRestSiblings: true,
}],
'no-use-before-define': 'off',
'object-curly-newline': ['error', {
// consistent: true,
// multiline: true,
ImportDeclaration: 'never',
ExportDeclaration: 'always',
ObjectExpression: {
consistent: true,
multiline: true,
},
ObjectPattern: {
consistent: true,
multiline: true,
},
}],
'react-hooks/exhaustive-deps': 0,
// Checks effect dependencies
'react-hooks/rules-of-hooks': 'error',
'react/button-has-type': 'off',
'react/destructuring-assignment': 'off',
'react/display-name': 0,
'react/forbid-prop-types': 'off',
'react/jsx-first-prop-new-line': 'off',
'react/jsx-fragments': 'off',
'react/jsx-one-expression-per-line': 'off',
'react/jsx-props-no-spreading': 'off',
'react/jsx-uses-react': 1,
'react/jsx-uses-vars': 1,
'react/no-array-index-key': 'off',
'react/no-did-update-set-state': 'off',
'react/no-unused-state': 'off',
'react/prop-types': [2, { skipUndeclared: true }],
'react/react-in-jsx-scope': 0,
'react/require-default-props': 0,
'require-atomic-updates': 'off',
'require-await': 2,
camelcase: 'error',
curly: ['error', 'all'],
indent: ['error', 2, { SwitchCase: 1 }],
quotes: ['error', 'single'],
semi: ['error', 'always'],
},
};