zeno-config 2.1.0 → 2.2.0
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/package.json +1 -1
- package/src/eslint/index.js +8 -0
- package/src/eslint/rules/baseRules.js +6 -6
- package/src/eslint/rules/importPluginRules.js +2 -2
- package/src/eslint/rules/jsxA11yPluginRules.js +1 -1
- package/src/eslint/rules/reactPluginRules.js +6 -6
- package/src/eslint/rules/unicornPluginRules.js +5 -5
package/package.json
CHANGED
package/src/eslint/index.js
CHANGED
|
@@ -419,6 +419,14 @@ const defineZenoConfig = (arg1, arg2) => {
|
|
|
419
419
|
|
|
420
420
|
// Turn off formatting rules that might conflict with Prettier
|
|
421
421
|
prettierPlugin,
|
|
422
|
+
|
|
423
|
+
{
|
|
424
|
+
files: [`**/*{${allExtensionsString}}`],
|
|
425
|
+
rules: {
|
|
426
|
+
// prettier disables this but we can safely enable it
|
|
427
|
+
curly: 'error',
|
|
428
|
+
},
|
|
429
|
+
},
|
|
422
430
|
]);
|
|
423
431
|
};
|
|
424
432
|
|
|
@@ -16,7 +16,7 @@ const getBaseRules = () => {
|
|
|
16
16
|
'no-async-promise-executor': 'error',
|
|
17
17
|
|
|
18
18
|
// https://eslint.org/docs/latest/rules/no-await-in-loop
|
|
19
|
-
'no-await-in-loop': '
|
|
19
|
+
'no-await-in-loop': 'off',
|
|
20
20
|
|
|
21
21
|
// https://eslint.org/docs/latest/rules/no-class-assign
|
|
22
22
|
'no-class-assign': 'error',
|
|
@@ -196,7 +196,7 @@ const getBaseRules = () => {
|
|
|
196
196
|
'no-useless-backreference': 'error',
|
|
197
197
|
|
|
198
198
|
// https://eslint.org/docs/latest/rules/require-atomic-updates
|
|
199
|
-
'require-atomic-updates': ['
|
|
199
|
+
'require-atomic-updates': ['off', { allowProperties: false }], // noticed a feew weird cases with this one
|
|
200
200
|
|
|
201
201
|
// https://eslint.org/docs/latest/rules/use-isnan
|
|
202
202
|
'use-isnan': 'error',
|
|
@@ -215,7 +215,7 @@ const getBaseRules = () => {
|
|
|
215
215
|
|
|
216
216
|
// https://eslint.org/docs/latest/rules/camelcase
|
|
217
217
|
camelcase: [
|
|
218
|
-
'
|
|
218
|
+
'off',
|
|
219
219
|
{
|
|
220
220
|
properties: 'always',
|
|
221
221
|
ignoreDestructuring: false,
|
|
@@ -250,7 +250,7 @@ const getBaseRules = () => {
|
|
|
250
250
|
'default-case-last': 'error',
|
|
251
251
|
|
|
252
252
|
// https://eslint.org/docs/latest/rules/default-param-last
|
|
253
|
-
'default-param-last': '
|
|
253
|
+
'default-param-last': 'off',
|
|
254
254
|
|
|
255
255
|
// https://eslint.org/docs/latest/rules/dot-notation
|
|
256
256
|
'dot-notation': ['error', { allowKeywords: true }],
|
|
@@ -319,7 +319,7 @@ const getBaseRules = () => {
|
|
|
319
319
|
|
|
320
320
|
// https://eslint.org/docs/latest/rules/new-cap
|
|
321
321
|
'new-cap': [
|
|
322
|
-
'
|
|
322
|
+
'off',
|
|
323
323
|
{
|
|
324
324
|
newIsCap: true,
|
|
325
325
|
capIsNew: true,
|
|
@@ -401,7 +401,7 @@ const getBaseRules = () => {
|
|
|
401
401
|
number: true,
|
|
402
402
|
string: true,
|
|
403
403
|
disallowTemplateShorthand: true,
|
|
404
|
-
allow: ['!!', '~'],
|
|
404
|
+
allow: ['!!', '~', '+'],
|
|
405
405
|
},
|
|
406
406
|
],
|
|
407
407
|
|
|
@@ -135,7 +135,7 @@ const getImportPluginRules = (options = {}) => {
|
|
|
135
135
|
'import-x/dynamic-import-chunkname': 'off',
|
|
136
136
|
|
|
137
137
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/exports-last.md
|
|
138
|
-
'import-x/exports-last': '
|
|
138
|
+
'import-x/exports-last': 'off',
|
|
139
139
|
|
|
140
140
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/extensions.md
|
|
141
141
|
'import-x/extensions': [
|
|
@@ -148,7 +148,7 @@ const getImportPluginRules = (options = {}) => {
|
|
|
148
148
|
'import-x/first': 'error',
|
|
149
149
|
|
|
150
150
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/group-exports.md
|
|
151
|
-
'import-x/group-exports': '
|
|
151
|
+
'import-x/group-exports': 'off',
|
|
152
152
|
|
|
153
153
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/max-dependencies.md
|
|
154
154
|
'import-x/max-dependencies': 'off',
|
|
@@ -73,7 +73,7 @@ const getJsxA11yPluginRules = () => {
|
|
|
73
73
|
'jsx-a11y/no-aria-hidden-on-focusable': 'off',
|
|
74
74
|
|
|
75
75
|
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-autofocus.md
|
|
76
|
-
'jsx-a11y/no-autofocus': '
|
|
76
|
+
'jsx-a11y/no-autofocus': 'off',
|
|
77
77
|
|
|
78
78
|
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-distracting-elements.md
|
|
79
79
|
'jsx-a11y/no-distracting-elements': 'error',
|
|
@@ -59,11 +59,11 @@ const getReactPluginRules = (options = {}) => {
|
|
|
59
59
|
'react/forbid-elements': 'off',
|
|
60
60
|
|
|
61
61
|
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forbid-foreign-prop-types.md
|
|
62
|
-
'react/forbid-foreign-prop-types': '
|
|
62
|
+
'react/forbid-foreign-prop-types': 'warn',
|
|
63
63
|
|
|
64
64
|
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forbid-prop-types.md
|
|
65
65
|
'react/forbid-prop-types': [
|
|
66
|
-
'
|
|
66
|
+
'warn',
|
|
67
67
|
{
|
|
68
68
|
forbid: ['any', 'array', 'object'],
|
|
69
69
|
checkContextTypes: true,
|
|
@@ -142,7 +142,7 @@ const getReactPluginRules = (options = {}) => {
|
|
|
142
142
|
|
|
143
143
|
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md
|
|
144
144
|
'react/jsx-handler-names': [
|
|
145
|
-
'
|
|
145
|
+
'off',
|
|
146
146
|
{
|
|
147
147
|
eventHandlerPrefix: 'handle',
|
|
148
148
|
eventHandlerPropPrefix: 'on',
|
|
@@ -210,7 +210,7 @@ const getReactPluginRules = (options = {}) => {
|
|
|
210
210
|
|
|
211
211
|
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-leaked-render.md
|
|
212
212
|
'react/jsx-no-leaked-render': [
|
|
213
|
-
'
|
|
213
|
+
'off',
|
|
214
214
|
{ validStrategies: ['ternary', 'coerce'] },
|
|
215
215
|
],
|
|
216
216
|
|
|
@@ -254,7 +254,7 @@ const getReactPluginRules = (options = {}) => {
|
|
|
254
254
|
|
|
255
255
|
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md
|
|
256
256
|
'react/jsx-props-no-spreading': [
|
|
257
|
-
'
|
|
257
|
+
'warn',
|
|
258
258
|
{
|
|
259
259
|
html: 'enforce',
|
|
260
260
|
custom: 'ignore',
|
|
@@ -457,7 +457,7 @@ const getReactPluginRules = (options = {}) => {
|
|
|
457
457
|
],
|
|
458
458
|
|
|
459
459
|
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/state-in-constructor.md
|
|
460
|
-
'react/state-in-constructor': ['
|
|
460
|
+
'react/state-in-constructor': ['off', 'always'],
|
|
461
461
|
|
|
462
462
|
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/static-property-placement.md
|
|
463
463
|
'react/static-property-placement': 'off',
|
|
@@ -22,7 +22,7 @@ const getUnicornPluginRules = () => {
|
|
|
22
22
|
'unicorn/consistent-existence-index-check': 'off',
|
|
23
23
|
|
|
24
24
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-function-scoping.md
|
|
25
|
-
'unicorn/consistent-function-scoping': '
|
|
25
|
+
'unicorn/consistent-function-scoping': 'off',
|
|
26
26
|
|
|
27
27
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/custom-error-definition.md
|
|
28
28
|
'unicorn/custom-error-definition': 'error',
|
|
@@ -44,7 +44,7 @@ const getUnicornPluginRules = () => {
|
|
|
44
44
|
|
|
45
45
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/filename-case.md
|
|
46
46
|
'unicorn/filename-case': [
|
|
47
|
-
'
|
|
47
|
+
'off',
|
|
48
48
|
{
|
|
49
49
|
cases: {
|
|
50
50
|
camelCase: true,
|
|
@@ -91,7 +91,7 @@ const getUnicornPluginRules = () => {
|
|
|
91
91
|
'unicorn/no-array-sort': 'warn',
|
|
92
92
|
|
|
93
93
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-expression-member.md
|
|
94
|
-
'unicorn/no-await-expression-member': '
|
|
94
|
+
'unicorn/no-await-expression-member': 'off', // auto fix breaks logic
|
|
95
95
|
|
|
96
96
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-in-promise-methods.md
|
|
97
97
|
'unicorn/no-await-in-promise-methods': 'error',
|
|
@@ -160,7 +160,7 @@ const getUnicornPluginRules = () => {
|
|
|
160
160
|
'unicorn/no-process-exit': 'off',
|
|
161
161
|
|
|
162
162
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-single-promise-in-promise-methods.md
|
|
163
|
-
'unicorn/no-single-promise-in-promise-methods': '
|
|
163
|
+
'unicorn/no-single-promise-in-promise-methods': 'off', // false positives with new Class as elements in arrays
|
|
164
164
|
|
|
165
165
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-static-only-class.md
|
|
166
166
|
'unicorn/no-static-only-class': 'error',
|
|
@@ -217,7 +217,7 @@ const getUnicornPluginRules = () => {
|
|
|
217
217
|
'unicorn/no-useless-spread': 'error',
|
|
218
218
|
|
|
219
219
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-switch-case.md
|
|
220
|
-
'unicorn/no-useless-switch-case': '
|
|
220
|
+
'unicorn/no-useless-switch-case': 'off',
|
|
221
221
|
|
|
222
222
|
// this conflicts with requiring default props in React
|
|
223
223
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-undefined.md
|