eslint-config-simplesense 2.3.23 → 3.0.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/index.js +13 -3
- package/package.json +6 -6
- package/plugins/eslint-recommended.js +99 -20
- package/plugins/import.js +10 -2
- package/plugins/node.js +26 -5
- package/plugins/unicorn.js +5 -1
package/index.js
CHANGED
|
@@ -37,7 +37,9 @@
|
|
|
37
37
|
jest: true,
|
|
38
38
|
node: true,
|
|
39
39
|
},
|
|
40
|
-
parserOptions: {
|
|
40
|
+
parserOptions: {
|
|
41
|
+
ecmaVersion: 2021,
|
|
42
|
+
},
|
|
41
43
|
ignorePatterns: [
|
|
42
44
|
'!.*',
|
|
43
45
|
'.cache/',
|
|
@@ -64,7 +66,11 @@
|
|
|
64
66
|
],
|
|
65
67
|
plugins: ['vue'],
|
|
66
68
|
rules: {
|
|
67
|
-
'unicorn/filename-case': [
|
|
69
|
+
'unicorn/filename-case': [
|
|
70
|
+
'error', {
|
|
71
|
+
case: 'pascalCase',
|
|
72
|
+
},
|
|
73
|
+
],
|
|
68
74
|
'vue/component-name-in-template-casing': [ 'error', 'kebab-case' ],
|
|
69
75
|
'vue/component-definition-name-casing': [ 'error', 'kebab-case' ],
|
|
70
76
|
'vue/singleline-html-element-content-newline': 'off',
|
|
@@ -75,7 +81,11 @@
|
|
|
75
81
|
plugins: ['yml'],
|
|
76
82
|
rules: {
|
|
77
83
|
'yml/no-empty-document': ['off'],
|
|
78
|
-
'yml/quotes': [
|
|
84
|
+
'yml/quotes': [
|
|
85
|
+
'error', {
|
|
86
|
+
prefer: 'single',
|
|
87
|
+
},
|
|
88
|
+
],
|
|
79
89
|
},
|
|
80
90
|
},
|
|
81
91
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-simplesense",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "ESLint Config for SimpleSense Styles",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -67,17 +67,17 @@
|
|
|
67
67
|
"eslint-plugin-regexp": "^1.12.0",
|
|
68
68
|
"eslint-plugin-security": "^1.7.1",
|
|
69
69
|
"eslint-plugin-sonarjs": "^0.18.0",
|
|
70
|
-
"eslint-plugin-unicorn": "^
|
|
70
|
+
"eslint-plugin-unicorn": "^46.0.0",
|
|
71
71
|
"eslint-plugin-vue": "^9.9.0",
|
|
72
72
|
"eslint-plugin-yml": "^1.5.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@vuepress/plugin-pwa": "^1.9.
|
|
76
|
-
"eslint": "^8.
|
|
75
|
+
"@vuepress/plugin-pwa": "^1.9.9",
|
|
76
|
+
"eslint": "^8.35.0",
|
|
77
77
|
"hash-sum": "^2.0.0",
|
|
78
|
-
"jest": "^29.
|
|
78
|
+
"jest": "^29.5.0",
|
|
79
79
|
"sort-package-json": "^2.4.1",
|
|
80
|
-
"vuepress": "^1.9.
|
|
80
|
+
"vuepress": "^1.9.9",
|
|
81
81
|
"vuepress-theme-default-prefers-color-scheme": "^2.0.0"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
@@ -9,7 +9,11 @@
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
module.exports = {
|
|
12
|
-
'array-bracket-newline': [
|
|
12
|
+
'array-bracket-newline': [
|
|
13
|
+
'error', {
|
|
14
|
+
multiline: true,
|
|
15
|
+
},
|
|
16
|
+
],
|
|
13
17
|
'array-bracket-spacing': [
|
|
14
18
|
'error', 'always', {
|
|
15
19
|
arraysInArrays: false,
|
|
@@ -20,16 +24,29 @@
|
|
|
20
24
|
'array-callback-return': ['error'],
|
|
21
25
|
'array-element-newline': [ 'error', 'consistent' ],
|
|
22
26
|
'arrow-parens': [ 'error', 'always' ],
|
|
23
|
-
'arrow-spacing': [
|
|
27
|
+
'arrow-spacing': [
|
|
28
|
+
'error', {
|
|
29
|
+
after: true,
|
|
30
|
+
before: true,
|
|
31
|
+
},
|
|
32
|
+
],
|
|
24
33
|
'block-scoped-var': ['error'],
|
|
25
34
|
'block-spacing': [ 'error', 'always' ],
|
|
26
35
|
'brace-style': [ 'error', '1tbs' ],
|
|
27
|
-
camelcase: [
|
|
36
|
+
camelcase: [
|
|
37
|
+
'error', {
|
|
38
|
+
properties: 'always',
|
|
39
|
+
},
|
|
40
|
+
],
|
|
28
41
|
'comma-dangle': [ 'error', 'always-multiline' ],
|
|
29
42
|
'comma-spacing': ['error'],
|
|
30
43
|
'comma-style': ['error'],
|
|
31
44
|
'computed-property-spacing': [ 'error', 'never' ],
|
|
32
|
-
'consistent-return': [
|
|
45
|
+
'consistent-return': [
|
|
46
|
+
'error', {
|
|
47
|
+
treatUndefinedAsUnspecified: true,
|
|
48
|
+
},
|
|
49
|
+
],
|
|
33
50
|
curly: [ 'error', 'multi-line' ],
|
|
34
51
|
'default-case-last': ['error'],
|
|
35
52
|
'dot-location': [ 'error', 'property' ],
|
|
@@ -38,15 +55,28 @@
|
|
|
38
55
|
eqeqeq: [ 'error', 'always' ],
|
|
39
56
|
'for-direction': ['error'],
|
|
40
57
|
'func-call-spacing': [ 'error', 'never' ],
|
|
41
|
-
'generator-star-spacing': [
|
|
58
|
+
'generator-star-spacing': [
|
|
59
|
+
'error', {
|
|
60
|
+
after: false,
|
|
61
|
+
before: true,
|
|
62
|
+
},
|
|
63
|
+
],
|
|
42
64
|
'guard-for-in': ['error'],
|
|
43
65
|
indent: [
|
|
44
66
|
'error', 2, {
|
|
45
67
|
ArrayExpression: 1,
|
|
46
|
-
CallExpression: {
|
|
68
|
+
CallExpression: {
|
|
69
|
+
arguments: 1,
|
|
70
|
+
},
|
|
47
71
|
flatTernaryExpressions: true,
|
|
48
|
-
FunctionDeclaration: {
|
|
49
|
-
|
|
72
|
+
FunctionDeclaration: {
|
|
73
|
+
body: 1,
|
|
74
|
+
parameters: 1,
|
|
75
|
+
},
|
|
76
|
+
FunctionExpression: {
|
|
77
|
+
body: 1,
|
|
78
|
+
parameters: 1,
|
|
79
|
+
},
|
|
50
80
|
ignoredNodes: ['ConditionalExpression'],
|
|
51
81
|
ImportDeclaration: 1,
|
|
52
82
|
ObjectExpression: 1,
|
|
@@ -62,14 +92,23 @@
|
|
|
62
92
|
mode: 'strict',
|
|
63
93
|
},
|
|
64
94
|
],
|
|
65
|
-
'keyword-spacing': [
|
|
95
|
+
'keyword-spacing': [
|
|
96
|
+
'error', {
|
|
97
|
+
after: true,
|
|
98
|
+
before: true,
|
|
99
|
+
},
|
|
100
|
+
],
|
|
66
101
|
'linebreak-style': [ 'error', 'unix' ],
|
|
67
102
|
'lines-between-class-members': [ 'error', 'always' ],
|
|
68
103
|
'max-classes-per-file': [ 'error', 1 ],
|
|
69
104
|
'max-len': ['off'],
|
|
70
105
|
'new-cap': ['error'],
|
|
71
106
|
'new-parens': ['error'],
|
|
72
|
-
'newline-per-chained-call': [
|
|
107
|
+
'newline-per-chained-call': [
|
|
108
|
+
'error', {
|
|
109
|
+
ignoreChainWithDepth: 2,
|
|
110
|
+
},
|
|
111
|
+
],
|
|
73
112
|
'no-array-constructor': ['error'],
|
|
74
113
|
'no-async-promise-executor': ['error'],
|
|
75
114
|
'no-caller': ['error'],
|
|
@@ -113,12 +152,22 @@
|
|
|
113
152
|
'no-throw-literal': ['error'],
|
|
114
153
|
'no-trailing-spaces': ['error'],
|
|
115
154
|
'no-undef-init': ['error'],
|
|
116
|
-
'no-underscore-dangle': [
|
|
155
|
+
'no-underscore-dangle': [
|
|
156
|
+
'error', {
|
|
157
|
+
allowAfterSuper: true,
|
|
158
|
+
allowAfterThis: true,
|
|
159
|
+
enforceInMethodNames: false,
|
|
160
|
+
},
|
|
161
|
+
],
|
|
117
162
|
'no-unneeded-ternary': ['error'],
|
|
118
163
|
'no-unreachable-loop': ['error'],
|
|
119
164
|
'no-unsafe-negation': ['error'],
|
|
120
165
|
'no-unsafe-optional-chaining': ['error'],
|
|
121
|
-
'no-unused-vars': [
|
|
166
|
+
'no-unused-vars': [
|
|
167
|
+
'error', {
|
|
168
|
+
args: 'none',
|
|
169
|
+
},
|
|
170
|
+
],
|
|
122
171
|
'no-useless-backreference': ['error'],
|
|
123
172
|
'no-useless-call': ['error'],
|
|
124
173
|
'no-useless-computed-key': ['error'],
|
|
@@ -133,9 +182,16 @@
|
|
|
133
182
|
'no-with': ['error'],
|
|
134
183
|
'nonblock-statement-body-position': [ 'error', 'beside' ],
|
|
135
184
|
'object-curly-newline': [
|
|
136
|
-
'error',
|
|
137
|
-
|
|
138
|
-
|
|
185
|
+
'error',
|
|
186
|
+
{
|
|
187
|
+
ObjectExpression: {
|
|
188
|
+
multiline: true,
|
|
189
|
+
minProperties: 1,
|
|
190
|
+
},
|
|
191
|
+
ObjectPattern: {
|
|
192
|
+
consistent: true,
|
|
193
|
+
minProperties: 1,
|
|
194
|
+
},
|
|
139
195
|
ImportDeclaration: 'always',
|
|
140
196
|
ExportDeclaration: 'always',
|
|
141
197
|
},
|
|
@@ -146,6 +202,7 @@
|
|
|
146
202
|
objectsInObjects: false,
|
|
147
203
|
},
|
|
148
204
|
],
|
|
205
|
+
'object-property-newline': ['error'],
|
|
149
206
|
'object-shorthand': ['error'],
|
|
150
207
|
'one-var-declaration-per-line': ['error'],
|
|
151
208
|
'one-var': [ 'error', 'never' ],
|
|
@@ -186,7 +243,11 @@
|
|
|
186
243
|
next: PADDING_STATEMENT.EXPORTS,
|
|
187
244
|
},
|
|
188
245
|
],
|
|
189
|
-
'prefer-const': [
|
|
246
|
+
'prefer-const': [
|
|
247
|
+
'error', {
|
|
248
|
+
destructuring: 'all',
|
|
249
|
+
},
|
|
250
|
+
],
|
|
190
251
|
'prefer-promise-reject-errors': ['error'],
|
|
191
252
|
'prefer-rest-params': ['error'],
|
|
192
253
|
'prefer-spread': ['error'],
|
|
@@ -196,11 +257,20 @@
|
|
|
196
257
|
radix: ['error'],
|
|
197
258
|
'require-yield': ['error'],
|
|
198
259
|
'rest-spread-spacing': [ 'error', 'never' ],
|
|
199
|
-
'semi-spacing': [
|
|
260
|
+
'semi-spacing': [
|
|
261
|
+
'error', {
|
|
262
|
+
after: true,
|
|
263
|
+
before: false,
|
|
264
|
+
},
|
|
265
|
+
],
|
|
200
266
|
'semi-style': [ 'error', 'last' ],
|
|
201
267
|
semi: [ 'error', 'always' ],
|
|
202
268
|
'sort-imports': 'off',
|
|
203
|
-
'sort-vars': [
|
|
269
|
+
'sort-vars': [
|
|
270
|
+
'error', {
|
|
271
|
+
ignoreCase: false,
|
|
272
|
+
},
|
|
273
|
+
],
|
|
204
274
|
'space-before-blocks': [ 'error', 'always' ],
|
|
205
275
|
'space-before-function-paren': [ 'error', 'never' ],
|
|
206
276
|
'space-in-parens': [ 'error', 'never' ],
|
|
@@ -220,11 +290,20 @@
|
|
|
220
290
|
],
|
|
221
291
|
'spaced-comment': [ 'error', 'always' ],
|
|
222
292
|
strict: [ 'error', 'function' ],
|
|
223
|
-
'switch-colon-spacing': [
|
|
293
|
+
'switch-colon-spacing': [
|
|
294
|
+
'error', {
|
|
295
|
+
after: true,
|
|
296
|
+
before: false,
|
|
297
|
+
},
|
|
298
|
+
],
|
|
224
299
|
'symbol-description': ['error'],
|
|
225
300
|
'template-curly-spacing': [ 'error', 'always' ],
|
|
226
301
|
'template-tag-spacing': [ 'error', 'always' ],
|
|
227
|
-
'valid-typeof': [
|
|
302
|
+
'valid-typeof': [
|
|
303
|
+
'error', {
|
|
304
|
+
requireStringLiterals: true,
|
|
305
|
+
},
|
|
306
|
+
],
|
|
228
307
|
'wrap-iife': [ 'error', 'outside' ],
|
|
229
308
|
'wrap-regex': ['error'],
|
|
230
309
|
'yield-star-spacing': [ 'error', 'after' ],
|
package/plugins/import.js
CHANGED
|
@@ -14,7 +14,11 @@
|
|
|
14
14
|
'import/named': ['error'],
|
|
15
15
|
'import/namespace': ['error'],
|
|
16
16
|
'import/no-amd': ['error'],
|
|
17
|
-
'import/no-cycle': [
|
|
17
|
+
'import/no-cycle': [
|
|
18
|
+
'error', {
|
|
19
|
+
commonjs: true,
|
|
20
|
+
},
|
|
21
|
+
],
|
|
18
22
|
'import/no-deprecated': ['error'],
|
|
19
23
|
'import/no-duplicates': ['error'],
|
|
20
24
|
'import/no-dynamic-require': ['error'],
|
|
@@ -32,7 +36,11 @@
|
|
|
32
36
|
],
|
|
33
37
|
},
|
|
34
38
|
],
|
|
35
|
-
'import/no-useless-path-segments': [
|
|
39
|
+
'import/no-useless-path-segments': [
|
|
40
|
+
'error', {
|
|
41
|
+
commonjs: true,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
36
44
|
'import/order': [
|
|
37
45
|
'error', {
|
|
38
46
|
groups: [
|
package/plugins/node.js
CHANGED
|
@@ -18,7 +18,11 @@
|
|
|
18
18
|
// not used because it does not support IIFE
|
|
19
19
|
// 'node/global-require': ['error'],
|
|
20
20
|
'node/handle-callback-err': ['error'],
|
|
21
|
-
'node/no-deprecated-api': [
|
|
21
|
+
'node/no-deprecated-api': [
|
|
22
|
+
'error', {
|
|
23
|
+
version: NODE_VERSION,
|
|
24
|
+
},
|
|
25
|
+
],
|
|
22
26
|
'node/no-missing-import': ['error'],
|
|
23
27
|
'node/no-missing-require': [
|
|
24
28
|
'error', {
|
|
@@ -26,12 +30,29 @@
|
|
|
26
30
|
resolvePaths: [path.resolve(__dirname, `${ ROOT_DIR }/lambda/layers/node-modules/nodejs/node_modules`)],
|
|
27
31
|
},
|
|
28
32
|
],
|
|
29
|
-
'node/no-mixed-requires': [
|
|
33
|
+
'node/no-mixed-requires': [
|
|
34
|
+
'error', {
|
|
35
|
+
allowCall: true,
|
|
36
|
+
grouping: true,
|
|
37
|
+
},
|
|
38
|
+
],
|
|
30
39
|
'node/no-new-require': ['error'],
|
|
31
40
|
'node/no-path-concat': ['error'],
|
|
32
|
-
'node/no-unsupported-features/es-builtins': [
|
|
33
|
-
|
|
34
|
-
|
|
41
|
+
'node/no-unsupported-features/es-builtins': [
|
|
42
|
+
'error', {
|
|
43
|
+
version: NODE_VERSION,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
'node/no-unsupported-features/es-syntax': [
|
|
47
|
+
'error', {
|
|
48
|
+
version: NODE_VERSION,
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
'node/no-unsupported-features/node-builtins': [
|
|
52
|
+
'error', {
|
|
53
|
+
version: NODE_VERSION,
|
|
54
|
+
},
|
|
55
|
+
],
|
|
35
56
|
'node/no-unpublished-bin': ['error'],
|
|
36
57
|
'node/no-unpublished-import': ['error'],
|
|
37
58
|
'node/no-unpublished-require': [
|
package/plugins/unicorn.js
CHANGED
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
module.exports = {
|
|
5
5
|
'unicorn/better-regex': ['error'],
|
|
6
|
-
'unicorn/catch-error-name': [
|
|
6
|
+
'unicorn/catch-error-name': [
|
|
7
|
+
'error', {
|
|
8
|
+
name: 'err',
|
|
9
|
+
},
|
|
10
|
+
],
|
|
7
11
|
'unicorn/consistent-function-scoping': ['error'],
|
|
8
12
|
'unicorn/custom-error-definition': ['error'],
|
|
9
13
|
'unicorn/empty-brace-spaces': ['error'],
|