@enormora/eslint-config-base 0.0.12 → 0.0.14
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/base.js +4 -5
- package/package.json +11 -11
- package/rule-sets/best-practices.js +12 -1
- package/rule-sets/stylistic.js +6 -3
package/base.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import importPlugin from 'eslint-plugin-import';
|
|
2
|
-
import eslintCommentsPlugin from 'eslint-plugin-eslint-comments';
|
|
1
|
+
import importPlugin from 'eslint-plugin-import-x';
|
|
2
|
+
import eslintCommentsPlugin from '@eslint-community/eslint-plugin-eslint-comments';
|
|
3
3
|
import noSecretsPlugin from 'eslint-plugin-no-secrets';
|
|
4
4
|
import codeSpellChecker from '@cspell/eslint-plugin';
|
|
5
5
|
import { stylisticRuleSet } from './rule-sets/stylistic.js';
|
|
@@ -99,7 +99,6 @@ export const baseConfig = {
|
|
|
99
99
|
'no-nested-ternary': 'error',
|
|
100
100
|
'no-new': 'error',
|
|
101
101
|
'no-new-func': 'error',
|
|
102
|
-
'no-new-symbol': 'error',
|
|
103
102
|
'no-new-wrappers': 'error',
|
|
104
103
|
'no-obj-calls': 'error',
|
|
105
104
|
'no-object-constructor': 'error',
|
|
@@ -237,7 +236,6 @@ export const baseConfig = {
|
|
|
237
236
|
'capitalized-comments': 'off',
|
|
238
237
|
'class-methods-use-this': 'error',
|
|
239
238
|
'func-name-matching': 'off',
|
|
240
|
-
'line-comment-position': 'off',
|
|
241
239
|
'no-await-in-loop': 'off',
|
|
242
240
|
'no-compare-neg-zero': 'error',
|
|
243
241
|
'no-multi-assign': 'error',
|
|
@@ -278,7 +276,6 @@ export const baseConfig = {
|
|
|
278
276
|
allowImplicit: false
|
|
279
277
|
}
|
|
280
278
|
],
|
|
281
|
-
'multiline-comment-style': 'off',
|
|
282
279
|
'max-classes-per-file': 'off',
|
|
283
280
|
'max-lines-per-function': 'off',
|
|
284
281
|
'prefer-object-spread': 'error',
|
|
@@ -317,6 +314,7 @@ export const baseConfig = {
|
|
|
317
314
|
'no-constant-binary-expression': 'error',
|
|
318
315
|
'logical-assignment-operators': ['error', 'never'],
|
|
319
316
|
'prefer-object-has-own': 'error',
|
|
317
|
+
'no-useless-assignment': 'error',
|
|
320
318
|
|
|
321
319
|
'no-secrets/no-secrets': ['error', { tolerance: 5 }],
|
|
322
320
|
|
|
@@ -402,6 +400,7 @@ export const baseConfig = {
|
|
|
402
400
|
'import/no-import-module-exports': 'off',
|
|
403
401
|
'import/no-empty-named-blocks': 'error',
|
|
404
402
|
'import/consistent-type-specifier-style': 'off',
|
|
403
|
+
'import/no-rename-default': 'off',
|
|
405
404
|
|
|
406
405
|
'@cspell/spellchecker': [
|
|
407
406
|
'warn',
|
package/package.json
CHANGED
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
"Christian Rackerseder <github@echooff.de>"
|
|
5
5
|
],
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@cspell/eslint-plugin": "8.
|
|
8
|
-
"@
|
|
9
|
-
"eslint-plugin
|
|
7
|
+
"@cspell/eslint-plugin": "8.14.2",
|
|
8
|
+
"@eslint-community/eslint-plugin-eslint-comments": "4.4.0",
|
|
9
|
+
"@stylistic/eslint-plugin": "2.7.2",
|
|
10
|
+
"eslint-plugin-array-func": "5.0.2",
|
|
10
11
|
"eslint-plugin-destructuring": "2.2.1",
|
|
11
|
-
"eslint-plugin-
|
|
12
|
-
"eslint-plugin-
|
|
13
|
-
"eslint-plugin-
|
|
14
|
-
"eslint-plugin-
|
|
15
|
-
"eslint-plugin-
|
|
16
|
-
"eslint-plugin-
|
|
17
|
-
"eslint-plugin-unicorn": "50.0.1"
|
|
12
|
+
"eslint-plugin-import-x": "4.1.1",
|
|
13
|
+
"eslint-plugin-no-secrets": "1.0.2",
|
|
14
|
+
"eslint-plugin-prettier": "5.2.1",
|
|
15
|
+
"eslint-plugin-promise": "7.1.0",
|
|
16
|
+
"eslint-plugin-sonarjs": "1.0.4",
|
|
17
|
+
"eslint-plugin-unicorn": "55.0.0"
|
|
18
18
|
},
|
|
19
19
|
"description": "Enormora’s ESLint base configuration",
|
|
20
20
|
"license": "MIT",
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"url": "git://github.com/enormora/eslint-config.git"
|
|
26
26
|
},
|
|
27
27
|
"type": "module",
|
|
28
|
-
"version": "0.0.
|
|
28
|
+
"version": "0.0.14"
|
|
29
29
|
}
|
|
@@ -124,6 +124,16 @@ export const bestPracticesRuleSet = {
|
|
|
124
124
|
'unicorn/prefer-top-level-await': 'off',
|
|
125
125
|
'unicorn/prefer-at': 'error',
|
|
126
126
|
'unicorn/no-unnecessary-polyfills': 'off',
|
|
127
|
+
'unicorn/no-single-promise-in-promise-methods': 'error',
|
|
128
|
+
'unicorn/no-await-in-promise-methods': 'error',
|
|
129
|
+
'unicorn/no-anonymous-default-export': 'error',
|
|
130
|
+
'unicorn/consistent-empty-array-spread': 'error',
|
|
131
|
+
'unicorn/no-invalid-fetch-options': 'error',
|
|
132
|
+
'unicorn/no-length-as-slice-end': 'error',
|
|
133
|
+
'unicorn/no-magic-array-flat-depth': 'error',
|
|
134
|
+
'unicorn/no-negation-in-equality-check': 'error',
|
|
135
|
+
'unicorn/prefer-string-raw': 'off',
|
|
136
|
+
'unicorn/prefer-structured-clone': 'error',
|
|
127
137
|
|
|
128
138
|
'array-func/from-map': 'error',
|
|
129
139
|
'array-func/no-unnecessary-this-arg': 'error',
|
|
@@ -184,6 +194,7 @@ export const bestPracticesRuleSet = {
|
|
|
184
194
|
'promise/no-return-in-finally': 'error',
|
|
185
195
|
'promise/valid-params': 'error',
|
|
186
196
|
'promise/prefer-await-to-then': 'error',
|
|
187
|
-
'promise/no-multiple-resolved': 'error'
|
|
197
|
+
'promise/no-multiple-resolved': 'error',
|
|
198
|
+
'promise/spec-only': 'error'
|
|
188
199
|
}
|
|
189
200
|
};
|
package/rule-sets/stylistic.js
CHANGED
|
@@ -19,7 +19,7 @@ export const stylisticRuleSet = {
|
|
|
19
19
|
'destructuring/in-params': ['error', { 'max-params': 0 }],
|
|
20
20
|
'destructuring/no-rename': 'off',
|
|
21
21
|
|
|
22
|
-
'@stylistic/array-bracket-newline':
|
|
22
|
+
'@stylistic/array-bracket-newline': 'off',
|
|
23
23
|
'@stylistic/array-bracket-spacing': ['error', 'never'],
|
|
24
24
|
'@stylistic/array-element-newline': ['error', 'consistent'],
|
|
25
25
|
'@stylistic/arrow-parens': ['error', 'always'],
|
|
@@ -74,7 +74,6 @@ export const stylisticRuleSet = {
|
|
|
74
74
|
'@stylistic/jsx-curly-spacing': 'off',
|
|
75
75
|
'@stylistic/jsx-equals-spacing': 'off',
|
|
76
76
|
'@stylistic/jsx-first-prop-new-line': 'off',
|
|
77
|
-
'@stylistic/jsx-indent': 'off',
|
|
78
77
|
'@stylistic/jsx-indent-props': 'off',
|
|
79
78
|
'@stylistic/jsx-max-props-per-line': 'off',
|
|
80
79
|
'@stylistic/jsx-newline': 'off',
|
|
@@ -85,6 +84,7 @@ export const stylisticRuleSet = {
|
|
|
85
84
|
'@stylistic/jsx-tag-spacing': 'off',
|
|
86
85
|
'@stylistic/jsx-quotes': 'off',
|
|
87
86
|
'@stylistic/jsx-wrap-multilines': 'off',
|
|
87
|
+
'@stylistic/jsx-function-call-newline': 'off',
|
|
88
88
|
'@stylistic/key-spacing': [
|
|
89
89
|
'error',
|
|
90
90
|
{
|
|
@@ -229,6 +229,9 @@ export const stylisticRuleSet = {
|
|
|
229
229
|
'@stylistic/type-named-tuple-spacing': 'error',
|
|
230
230
|
'@stylistic/wrap-iife': ['error', 'inside'],
|
|
231
231
|
'@stylistic/wrap-regex': 'off',
|
|
232
|
-
'@stylistic/yield-star-spacing': ['error', { before: false, after: true }]
|
|
232
|
+
'@stylistic/yield-star-spacing': ['error', { before: false, after: true }],
|
|
233
|
+
'@stylistic/jsx-pascal-case': 'off',
|
|
234
|
+
'@stylistic/line-comment-position': 'off',
|
|
235
|
+
'@stylistic/multiline-comment-style': 'off'
|
|
233
236
|
}
|
|
234
237
|
};
|