@morgs32/eslint-config 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +114 -114
- package/package.json +1 -1
package/.eslintrc.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
+
// @ts-check
|
|
1
2
|
module.exports = {
|
|
2
3
|
extends: [
|
|
3
|
-
|
|
4
|
+
"next/core-web-vitals"
|
|
4
5
|
],
|
|
5
6
|
ignorePatterns: [
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
"**/lib",
|
|
8
|
+
"**/dist",
|
|
8
9
|
],
|
|
9
10
|
plugins: [
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
"unused-imports",
|
|
12
|
+
"react"
|
|
12
13
|
],
|
|
13
14
|
rules: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
quotes: [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
'error',
|
|
15
|
+
"spaced-comment": ["error", "always", { "markers": ["/"] }],
|
|
16
|
+
"unused-imports/no-unused-imports": "error",
|
|
17
|
+
"comma-spacing": ["error", { "before": false, "after": true }],
|
|
18
|
+
"react/jsx-indent": ["error", 2],
|
|
19
|
+
"space-infix-ops": ["error"],
|
|
20
|
+
"react-hooks/rules-of-hooks": 0, // Checks rules of Hooks
|
|
21
|
+
quotes: ["error", "double"],
|
|
22
|
+
"space-before-blocks": "error",
|
|
23
|
+
"keyword-spacing": "error",
|
|
24
|
+
"object-curly-spacing": ["error", "always"],
|
|
25
|
+
"object-curly-newline": [
|
|
26
|
+
"error",
|
|
27
27
|
{
|
|
28
28
|
ObjectExpression: {
|
|
29
29
|
multiline: true,
|
|
@@ -47,147 +47,147 @@ module.exports = {
|
|
|
47
47
|
},
|
|
48
48
|
},
|
|
49
49
|
],
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
"react/jsx-indent-props": [2, 2],
|
|
51
|
+
"react/jsx-first-prop-new-line": [2, "multiline"],
|
|
52
52
|
|
|
53
53
|
// https://github.com/facebook/create-react-app/blob/main/packages/eslint-config-react-app/index.js
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
eqeqeq: [
|
|
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
|
-
|
|
54
|
+
"array-callback-return": "warn",
|
|
55
|
+
"default-case": ["warn", { commentPattern: "^no default$" }],
|
|
56
|
+
"dot-location": ["warn", "property"],
|
|
57
|
+
eqeqeq: ["warn", "smart"],
|
|
58
|
+
"new-parens": "warn",
|
|
59
|
+
"no-array-constructor": "warn",
|
|
60
|
+
"no-caller": "warn",
|
|
61
|
+
"no-cond-assign": ["warn", "except-parens"],
|
|
62
|
+
"no-const-assign": "warn",
|
|
63
|
+
"no-control-regex": "warn",
|
|
64
|
+
"no-delete-var": "warn",
|
|
65
|
+
"no-dupe-args": "warn",
|
|
66
|
+
"no-dupe-class-members": "warn",
|
|
67
|
+
"no-dupe-keys": "warn",
|
|
68
|
+
"no-duplicate-case": "warn",
|
|
69
|
+
"no-empty-character-class": "warn",
|
|
70
|
+
"no-empty-pattern": "warn",
|
|
71
|
+
"no-eval": "warn",
|
|
72
|
+
"no-ex-assign": "warn",
|
|
73
|
+
"no-extend-native": "warn",
|
|
74
|
+
"no-extra-bind": "warn",
|
|
75
|
+
"no-extra-label": "warn",
|
|
76
|
+
"no-fallthrough": "warn",
|
|
77
|
+
"no-func-assign": "warn",
|
|
78
|
+
"no-implied-eval": "warn",
|
|
79
|
+
"no-invalid-regexp": "warn",
|
|
80
|
+
"no-iterator": "warn",
|
|
81
|
+
"no-label-var": "warn",
|
|
82
|
+
"no-labels": ["warn", { allowLoop: true, allowSwitch: false }],
|
|
83
|
+
"no-lone-blocks": "warn",
|
|
84
|
+
"no-loop-func": "warn",
|
|
85
|
+
"no-mixed-operators": [
|
|
86
|
+
"warn",
|
|
87
87
|
{
|
|
88
88
|
groups: [
|
|
89
|
-
[
|
|
90
|
-
[
|
|
91
|
-
[
|
|
92
|
-
[
|
|
89
|
+
["&", "|", "^", "~", "<<", ">>", ">>>"],
|
|
90
|
+
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
|
|
91
|
+
["&&", "||"],
|
|
92
|
+
["in", "instanceof"],
|
|
93
93
|
],
|
|
94
94
|
allowSamePrecedence: false,
|
|
95
95
|
},
|
|
96
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
|
-
|
|
97
|
+
"no-multi-str": "warn",
|
|
98
|
+
"no-global-assign": "warn",
|
|
99
|
+
"no-unsafe-negation": "warn",
|
|
100
|
+
"no-new-func": "warn",
|
|
101
|
+
"no-new-object": "warn",
|
|
102
|
+
"no-new-symbol": "warn",
|
|
103
|
+
"no-new-wrappers": "warn",
|
|
104
|
+
"no-obj-calls": "warn",
|
|
105
|
+
"no-octal": "warn",
|
|
106
|
+
"no-octal-escape": "warn",
|
|
107
|
+
"no-redeclare": "warn",
|
|
108
|
+
"no-regex-spaces": "warn",
|
|
109
|
+
"no-restricted-syntax": ["warn", "WithStatement"],
|
|
110
|
+
"no-script-url": "warn",
|
|
111
|
+
"no-self-assign": "warn",
|
|
112
|
+
"no-self-compare": "warn",
|
|
113
|
+
"no-sequences": "warn",
|
|
114
|
+
"no-shadow-restricted-names": "warn",
|
|
115
|
+
"no-sparse-arrays": "warn",
|
|
116
|
+
"no-template-curly-in-string": "warn",
|
|
117
|
+
"no-this-before-super": "warn",
|
|
118
|
+
"no-throw-literal": "warn",
|
|
119
|
+
"no-undef": "error",
|
|
120
|
+
"no-unreachable": "warn",
|
|
121
|
+
"no-unused-expressions": [
|
|
122
|
+
"error",
|
|
123
123
|
{
|
|
124
124
|
allowShortCircuit: true,
|
|
125
125
|
allowTernary: true,
|
|
126
126
|
allowTaggedTemplates: true,
|
|
127
127
|
},
|
|
128
128
|
],
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
"no-unused-labels": "warn",
|
|
130
|
+
"no-unused-vars": [
|
|
131
|
+
"warn",
|
|
132
132
|
{
|
|
133
|
-
args:
|
|
133
|
+
args: "none",
|
|
134
134
|
ignoreRestSiblings: true,
|
|
135
135
|
},
|
|
136
136
|
],
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
"no-use-before-define": [
|
|
138
|
+
"warn",
|
|
139
139
|
{
|
|
140
140
|
functions: false,
|
|
141
141
|
classes: false,
|
|
142
142
|
variables: false,
|
|
143
143
|
},
|
|
144
144
|
],
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
145
|
+
"no-useless-computed-key": "warn",
|
|
146
|
+
"no-useless-concat": "warn",
|
|
147
|
+
"no-useless-constructor": "warn",
|
|
148
|
+
"no-useless-escape": "warn",
|
|
149
|
+
"no-useless-rename": [
|
|
150
|
+
"warn",
|
|
151
151
|
{
|
|
152
152
|
ignoreDestructuring: false,
|
|
153
153
|
ignoreImport: false,
|
|
154
154
|
ignoreExport: false,
|
|
155
155
|
},
|
|
156
156
|
],
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
157
|
+
"no-with": "warn",
|
|
158
|
+
"no-whitespace-before-property": "warn",
|
|
159
|
+
"react-hooks/exhaustive-deps": "warn",
|
|
160
|
+
"require-yield": "warn",
|
|
161
|
+
"rest-spread-spacing": ["warn", "never"],
|
|
162
162
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
163
|
+
"react/jsx-no-comment-textnodes": "warn",
|
|
164
|
+
"react/jsx-no-duplicate-props": "warn",
|
|
165
|
+
"react/jsx-no-target-blank": "warn",
|
|
166
|
+
"react/jsx-no-undef": "error",
|
|
167
|
+
"react/jsx-pascal-case": [
|
|
168
|
+
"warn",
|
|
169
169
|
{
|
|
170
170
|
allowAllCaps: true,
|
|
171
171
|
ignore: [],
|
|
172
172
|
},
|
|
173
173
|
],
|
|
174
|
-
|
|
174
|
+
"react/no-danger-with-children": "warn",
|
|
175
175
|
// Disabled because of undesirable warnings
|
|
176
176
|
// See https://github.com/facebook/create-react-app/issues/5204 for
|
|
177
177
|
// blockers until its re-enabled
|
|
178
178
|
// 'react/no-deprecated': 'warn',
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
179
|
+
"react/no-direct-mutation-state": "warn",
|
|
180
|
+
"react/no-is-mounted": "warn",
|
|
181
|
+
"react/no-typos": "error",
|
|
182
|
+
"react/require-render-return": "error",
|
|
183
|
+
"react/style-prop-object": "warn"
|
|
184
184
|
|
|
185
185
|
},
|
|
186
186
|
overrides: [
|
|
187
187
|
{
|
|
188
|
-
files: [
|
|
188
|
+
files: ["**/*.stories.*"],
|
|
189
189
|
rules: {
|
|
190
|
-
|
|
190
|
+
"import/no-anonymous-default-export": "off",
|
|
191
191
|
},
|
|
192
192
|
},
|
|
193
193
|
],
|