@prowise/eslint-config-linting-rules 2.0.5 → 2.0.7
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@prowise/eslint-config-linting-rules","version":"2.0.
|
|
1
|
+
{"name":"@prowise/eslint-config-linting-rules","version":"2.0.7","description":"Default Prowise linting rules for npm packages.","main":"index.js","type":"module","exports":{"./typescript":"./typescript.js","./backend":"./backend.js","./front-react":"./front-react.js","./front-solid":"./front-solid.js"},"scripts":{"lint":"eslint","inspect":"eslint --inspect-config"},"repository":{"type":"git","url":"git+ssh://git@bitbucket.org/prowise/npm-linting-rules.git"},"author":"Prowise B.V.","license":"UNLICENSED","homepage":"https://bitbucket.org/prowise/npm-linting-rules#readme","dependencies":{"@stylistic/eslint-plugin":"^2.12.1","confusing-browser-globals":"^1.0.11","eslint":"^9.16.0","eslint-import-resolver-typescript":"^3.7.0","eslint-plugin-import-x":"^4.5.0","eslint-plugin-jest":"^28.9.0","eslint-plugin-jsdoc":"^50.6.1","eslint-plugin-jsx-a11y":"^6.10.2","eslint-plugin-n":"^17.15.0","eslint-plugin-prefer-arrow-functions":"^3.4.1","eslint-plugin-react":"^7.37.2","eslint-plugin-solid":"^0.14.5","eslint-plugin-vitest":"^0.5.4","globals":"^15.13.0","typescript-eslint":"^8.18.0"},"devDependencies":{"@eslint/config-inspector":"^0.6.0"}}
|
package/rules/baseSettings.js
CHANGED
|
@@ -46,7 +46,7 @@ export default {
|
|
|
46
46
|
* Disallow await inside of loops
|
|
47
47
|
* https://eslint.org/docs/latest/rules/no-await-in-loop.
|
|
48
48
|
*/
|
|
49
|
-
|
|
49
|
+
"no-await-in-loop": "off",
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* Disallow modifying variables of class declarations ✅
|
|
@@ -391,22 +391,22 @@ export default {
|
|
|
391
391
|
* Enforce or disallow capitalization of the first letter of a comment 🔧
|
|
392
392
|
* https://eslint.org/docs/latest/rules/capitalized-comments.
|
|
393
393
|
*/
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
394
|
+
"capitalized-comments": [
|
|
395
|
+
"off",
|
|
396
|
+
"never",
|
|
397
|
+
{
|
|
398
|
+
line: {
|
|
399
|
+
ignorePattern: ".*",
|
|
400
|
+
ignoreInlineComments: true,
|
|
401
|
+
ignoreConsecutiveComments: true,
|
|
402
|
+
},
|
|
403
|
+
block: {
|
|
404
|
+
ignorePattern: ".*",
|
|
405
|
+
ignoreInlineComments: true,
|
|
406
|
+
ignoreConsecutiveComments: true,
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
],
|
|
410
410
|
|
|
411
411
|
/**
|
|
412
412
|
* Enforce that class methods use "this"
|
|
@@ -952,7 +952,7 @@ export default {
|
|
|
952
952
|
* Disallow specific imports
|
|
953
953
|
* https://eslint.org/docs/latest/rules/no-restricted-imports.
|
|
954
954
|
*/
|
|
955
|
-
|
|
955
|
+
"no-restricted-imports": ["off", { paths: [], patterns: [] }],
|
|
956
956
|
|
|
957
957
|
/**
|
|
958
958
|
* Disallow certain object properties
|
|
@@ -1032,7 +1032,7 @@ export default {
|
|
|
1032
1032
|
* Disallow use of assignment in return statement
|
|
1033
1033
|
* https://eslint.org/docs/latest/rules/no-return-assign.
|
|
1034
1034
|
*/
|
|
1035
|
-
|
|
1035
|
+
"no-return-assign": "off",
|
|
1036
1036
|
|
|
1037
1037
|
/**
|
|
1038
1038
|
* Disallow use of `javascript:` urls.
|
|
@@ -48,7 +48,7 @@ export default {
|
|
|
48
48
|
*
|
|
49
49
|
* Only warn, do not error on this, certain bundlers might accept it.
|
|
50
50
|
*/
|
|
51
|
-
|
|
51
|
+
"import/extensions": ["off", "always", { ignorePackages: true }],
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* Disallow non-import statements appearing before import statements
|
|
@@ -60,6 +60,9 @@ export default {
|
|
|
60
60
|
imports: "always-multiline",
|
|
61
61
|
exports: "always-multiline",
|
|
62
62
|
functions: "always-multiline",
|
|
63
|
+
enums: "always-multiline",
|
|
64
|
+
generics: "always-multiline",
|
|
65
|
+
tuples: "always-multiline",
|
|
63
66
|
},
|
|
64
67
|
],
|
|
65
68
|
|
|
@@ -180,14 +183,14 @@ export default {
|
|
|
180
183
|
* Enforce position of line comments
|
|
181
184
|
* https://eslint.org/docs/latest/rules/line-comment-position.
|
|
182
185
|
*/
|
|
183
|
-
"style/line-comment-position": [
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
],
|
|
186
|
+
// "style/line-comment-position": [
|
|
187
|
+
// "off",
|
|
188
|
+
// {
|
|
189
|
+
// position: "above",
|
|
190
|
+
// ignorePattern: "",
|
|
191
|
+
// applyDefaultPatterns: true,
|
|
192
|
+
// },
|
|
193
|
+
// ],
|
|
191
194
|
|
|
192
195
|
/**
|
|
193
196
|
* Disallow mixed "LF" and "CRLF" as linebreaks 🔧
|
|
@@ -162,8 +162,8 @@ export default {
|
|
|
162
162
|
* Require or disallow initialization in variable declarations
|
|
163
163
|
* https://typescript-eslint.io/rules/init-declarations.
|
|
164
164
|
*/
|
|
165
|
-
"init-declarations": "off",
|
|
166
|
-
"@typescript-eslint/init-declarations": baseRules.rules["init-declarations"],
|
|
165
|
+
// "init-declarations": "off",
|
|
166
|
+
// "@typescript-eslint/init-declarations": baseRules.rules["init-declarations"],
|
|
167
167
|
|
|
168
168
|
/**
|
|
169
169
|
* Require a consistent member declaration order
|
|
@@ -301,7 +301,6 @@ export default {
|
|
|
301
301
|
* https://typescript-eslint.io/rules/no-implied-eval.
|
|
302
302
|
*/
|
|
303
303
|
"no-implied-eval": "off",
|
|
304
|
-
"no-new-function": "off",
|
|
305
304
|
"@typescript-eslint/no-implied-eval": baseRules.rules["no-implied-eval"],
|
|
306
305
|
|
|
307
306
|
/**
|
|
@@ -315,8 +314,8 @@ export default {
|
|
|
315
314
|
* Disallow this keywords outside of classes or class-like objects.
|
|
316
315
|
* Https://typescript-eslint.io/rules/no-invalid-this.
|
|
317
316
|
*/
|
|
318
|
-
"no-invalid-this": "off",
|
|
319
|
-
"@typescript-eslint/no-invalid-this": baseRules.rules["no-invalid-this"],
|
|
317
|
+
// "no-invalid-this": "off",
|
|
318
|
+
// "@typescript-eslint/no-invalid-this": baseRules.rules["no-invalid-this"],
|
|
320
319
|
|
|
321
320
|
/**
|
|
322
321
|
* Disallow void type outside of generic or return types 🔒
|
|
@@ -335,8 +334,8 @@ export default {
|
|
|
335
334
|
* Disallow magic numbers.
|
|
336
335
|
* Https://typescript-eslint.io/rules/no-magic-numbers.
|
|
337
336
|
*/
|
|
338
|
-
"no-magic-numbers": "off",
|
|
339
|
-
"@typescript-eslint/no-magic-numbers": baseRules.rules["no-magic-numbers"],
|
|
337
|
+
// "no-magic-numbers": "off",
|
|
338
|
+
// "@typescript-eslint/no-magic-numbers": baseRules.rules["no-magic-numbers"],
|
|
340
339
|
|
|
341
340
|
/**
|
|
342
341
|
* Disallow the void operator except when used to discard a value 🔒 🔧 💡 💭
|
|
@@ -739,19 +738,19 @@ export default {
|
|
|
739
738
|
},
|
|
740
739
|
],
|
|
741
740
|
|
|
742
|
-
"import/no-extraneous-dependencies": [
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
],
|
|
741
|
+
// "import/no-extraneous-dependencies": [
|
|
742
|
+
// importRules.rules["import/no-extraneous-dependencies"][0],
|
|
743
|
+
// {
|
|
744
|
+
// ...importRules.rules["import/no-extraneous-dependencies"][1],
|
|
745
|
+
// devDependencies: importRules.rules["import/no-extraneous-dependencies"][1].devDependencies.reduce(
|
|
746
|
+
// (result, devDep) => {
|
|
747
|
+
// const toAppend = [devDep];
|
|
748
|
+
// const devDepWithTs = devDep.replace(/\bjs(x?)\b/g, "ts$1");
|
|
749
|
+
// if (devDepWithTs !== devDep) toAppend.push(devDepWithTs);
|
|
750
|
+
// return [...result, ...toAppend];
|
|
751
|
+
// },
|
|
752
|
+
// ),
|
|
753
|
+
// },
|
|
754
|
+
// ],
|
|
756
755
|
},
|
|
757
756
|
};
|