@enormora/eslint-config-base 0.0.21 → 0.0.23
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 +5 -2
- package/constants.js +1 -1
- package/package.json +5 -5
- package/rule-sets/best-practices.js +18 -3
- package/rule-sets/stylistic.js +0 -2
package/base.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import importPlugin from 'eslint-plugin-import-x';
|
|
1
|
+
import importPlugin, { createNodeResolver } from 'eslint-plugin-import-x';
|
|
2
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';
|
|
@@ -36,7 +36,8 @@ export const baseConfig = {
|
|
|
36
36
|
...bestPracticesRuleSet.settings,
|
|
37
37
|
'import/parsers': {
|
|
38
38
|
espree: javascriptExtensions
|
|
39
|
-
}
|
|
39
|
+
},
|
|
40
|
+
'import-x/resolver-next': [createNodeResolver()]
|
|
40
41
|
},
|
|
41
42
|
rules: {
|
|
42
43
|
...stylisticRuleSet.rules,
|
|
@@ -160,6 +161,7 @@ export const baseConfig = {
|
|
|
160
161
|
],
|
|
161
162
|
'prefer-spread': 'error',
|
|
162
163
|
'prefer-template': 'error',
|
|
164
|
+
'preserve-caught-error': 'error',
|
|
163
165
|
'no-var': 'error',
|
|
164
166
|
'no-warning-comments': [
|
|
165
167
|
'error',
|
|
@@ -403,6 +405,7 @@ export const baseConfig = {
|
|
|
403
405
|
'import/no-empty-named-blocks': 'error',
|
|
404
406
|
'import/consistent-type-specifier-style': 'off',
|
|
405
407
|
'import/no-rename-default': 'off',
|
|
408
|
+
'import/prefer-namespace-import': 'off',
|
|
406
409
|
|
|
407
410
|
'@cspell/spellchecker': [
|
|
408
411
|
'warn',
|
package/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
"Christian Rackerseder <github@echooff.de>"
|
|
5
5
|
],
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@cspell/eslint-plugin": "9.2.
|
|
7
|
+
"@cspell/eslint-plugin": "9.2.1",
|
|
8
8
|
"@eslint-community/eslint-plugin-eslint-comments": "4.5.0",
|
|
9
|
-
"@stylistic/eslint-plugin": "
|
|
9
|
+
"@stylistic/eslint-plugin": "5.3.1",
|
|
10
10
|
"eslint-plugin-array-func": "5.0.2",
|
|
11
11
|
"eslint-plugin-destructuring": "2.2.1",
|
|
12
|
-
"eslint-plugin-import-x": "4.
|
|
12
|
+
"eslint-plugin-import-x": "4.16.1",
|
|
13
13
|
"eslint-plugin-no-secrets": "2.2.1",
|
|
14
14
|
"eslint-plugin-prettier": "5.5.4",
|
|
15
15
|
"eslint-plugin-promise": "7.2.1",
|
|
16
16
|
"eslint-plugin-sonarjs": "1.0.4",
|
|
17
|
-
"eslint-plugin-unicorn": "
|
|
17
|
+
"eslint-plugin-unicorn": "61.0.2"
|
|
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.23"
|
|
29
29
|
}
|
|
@@ -33,7 +33,6 @@ export const bestPracticesRuleSet = {
|
|
|
33
33
|
'unicorn/filename-case': 'off',
|
|
34
34
|
'unicorn/new-for-builtins': 'error',
|
|
35
35
|
'unicorn/no-abusive-eslint-disable': 'error',
|
|
36
|
-
'unicorn/no-instanceof-array': 'error',
|
|
37
36
|
'unicorn/no-console-spaces': 'error',
|
|
38
37
|
'unicorn/no-array-callback-reference': 'off',
|
|
39
38
|
'unicorn/no-for-loop': 'error',
|
|
@@ -79,7 +78,6 @@ export const bestPracticesRuleSet = {
|
|
|
79
78
|
'unicorn/prefer-date-now': 'error',
|
|
80
79
|
'unicorn/consistent-destructuring': 'off',
|
|
81
80
|
'unicorn/no-array-for-each': 'off',
|
|
82
|
-
'unicorn/no-array-push-push': 'error',
|
|
83
81
|
'unicorn/no-new-array': 'error',
|
|
84
82
|
'unicorn/no-this-assignment': 'error',
|
|
85
83
|
'unicorn/prefer-array-index-of': 'error',
|
|
@@ -129,7 +127,6 @@ export const bestPracticesRuleSet = {
|
|
|
129
127
|
'unicorn/no-anonymous-default-export': 'error',
|
|
130
128
|
'unicorn/consistent-empty-array-spread': 'error',
|
|
131
129
|
'unicorn/no-invalid-fetch-options': 'error',
|
|
132
|
-
'unicorn/no-length-as-slice-end': 'error',
|
|
133
130
|
'unicorn/no-magic-array-flat-depth': 'error',
|
|
134
131
|
'unicorn/no-negation-in-equality-check': 'error',
|
|
135
132
|
'unicorn/prefer-string-raw': 'off',
|
|
@@ -137,6 +134,24 @@ export const bestPracticesRuleSet = {
|
|
|
137
134
|
'unicorn/consistent-existence-index-check': 'error',
|
|
138
135
|
'unicorn/prefer-global-this': 'error',
|
|
139
136
|
'unicorn/prefer-math-min-max': 'error',
|
|
137
|
+
'unicorn/consistent-assert': 'error',
|
|
138
|
+
'unicorn/consistent-date-clone': 'error',
|
|
139
|
+
'unicorn/no-accessor-recursion': 'error',
|
|
140
|
+
'unicorn/no-array-reverse': 'error',
|
|
141
|
+
'unicorn/no-array-sort': 'error',
|
|
142
|
+
'unicorn/no-instanceof-builtins': 'error',
|
|
143
|
+
'unicorn/no-named-default': 'error',
|
|
144
|
+
'unicorn/no-unnecessary-array-flat-depth': 'error',
|
|
145
|
+
'unicorn/no-unnecessary-array-splice-count': 'error',
|
|
146
|
+
'unicorn/no-unnecessary-slice-end': 'error',
|
|
147
|
+
'unicorn/no-useless-error-capture-stack-trace': 'error',
|
|
148
|
+
'unicorn/prefer-bigint-literals': 'error',
|
|
149
|
+
'unicorn/prefer-class-fields': 'error',
|
|
150
|
+
'unicorn/prefer-classlist-toggle': 'error',
|
|
151
|
+
'unicorn/prefer-import-meta-properties': 'off',
|
|
152
|
+
'unicorn/prefer-single-call': 'error',
|
|
153
|
+
'unicorn/require-module-attributes': 'error',
|
|
154
|
+
'unicorn/require-module-specifiers': 'error',
|
|
140
155
|
|
|
141
156
|
'array-func/from-map': 'error',
|
|
142
157
|
'array-func/no-unnecessary-this-arg': 'error',
|
package/rule-sets/stylistic.js
CHANGED
|
@@ -50,7 +50,6 @@ export const stylisticRuleSet = {
|
|
|
50
50
|
],
|
|
51
51
|
'@stylistic/dot-location': ['error', 'property'],
|
|
52
52
|
'@stylistic/eol-last': 'error',
|
|
53
|
-
'@stylistic/func-call-spacing': ['error', 'never'],
|
|
54
53
|
'@stylistic/function-call-spacing': ['error', 'never'],
|
|
55
54
|
'@stylistic/function-call-argument-newline': ['error', 'consistent'],
|
|
56
55
|
'@stylistic/function-paren-newline': 'off',
|
|
@@ -78,7 +77,6 @@ export const stylisticRuleSet = {
|
|
|
78
77
|
'@stylistic/jsx-max-props-per-line': 'off',
|
|
79
78
|
'@stylistic/jsx-newline': 'off',
|
|
80
79
|
'@stylistic/jsx-one-expression-per-line': 'off',
|
|
81
|
-
'@stylistic/jsx-props-no-multi-spaces': 'off',
|
|
82
80
|
'@stylistic/jsx-self-closing-comp': 'off',
|
|
83
81
|
'@stylistic/jsx-sort-props': 'off',
|
|
84
82
|
'@stylistic/jsx-tag-spacing': 'off',
|