@prowise/eslint-config-linting-rules 3.0.4 → 3.0.6
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":"3.0.
|
|
1
|
+
{"name":"@prowise/eslint-config-linting-rules","version":"3.0.6","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","./next":"./next.js"},"scripts":{"lint":"eslint","test":"node tests/*.test.js","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":{"@eslint-react/eslint-plugin":"^5.18.6","@htmlacademy/eslint-plugin-jsx-a11y":"^6.11.0","@next/eslint-plugin-next":"^16.3.3","@stylistic/eslint-plugin":"^5.10.0","@vitest/eslint-plugin":"^1.6.27","confusing-browser-globals":"^1.0.11","eslint":"^10.9.1","eslint-import-resolver-typescript":"^4.4.5","eslint-plugin-import-x":"^4.17.1","eslint-plugin-jsdoc":"^64.2.1","eslint-plugin-n":"^18.3.0","eslint-plugin-prefer-arrow-functions":"^3.10.2","globals":"^17.11.0","nanospinner":"^1.2.2","typescript-eslint":"^8.68.0"},"devDependencies":{"@eslint/config-inspector":"^3.3.0"},"overrides":{"minimatch":"^10.2.5"},"allowScripts":{"unrs-resolver@1.12.2":true}}
|
package/rules/baseSettings.js
CHANGED
|
@@ -596,12 +596,6 @@ export default {
|
|
|
596
596
|
},
|
|
597
597
|
].concat(confusingBrowserGlobals),
|
|
598
598
|
|
|
599
|
-
/**
|
|
600
|
-
* Disallow specific imports
|
|
601
|
-
* https://eslint.org/docs/latest/rules/no-restricted-imports.
|
|
602
|
-
*/
|
|
603
|
-
"no-restricted-imports": ["off", { paths: [], patterns: [] }],
|
|
604
|
-
|
|
605
599
|
/**
|
|
606
600
|
* Disallow certain object properties
|
|
607
601
|
* https://eslint.org/docs/latest/rules/no-restricted-properties.
|
|
@@ -184,7 +184,7 @@ export default {
|
|
|
184
184
|
checkGetters: true,
|
|
185
185
|
checkSetters: true,
|
|
186
186
|
require: {
|
|
187
|
-
ClassDeclaration:
|
|
187
|
+
ClassDeclaration: false,
|
|
188
188
|
ClassExpression: true,
|
|
189
189
|
FunctionDeclaration: true,
|
|
190
190
|
FunctionExpression: true,
|
|
@@ -194,11 +194,7 @@ export default {
|
|
|
194
194
|
// @see https://ts-ast-viewer.com/#
|
|
195
195
|
"ClassProperty",
|
|
196
196
|
"FunctionDeclaration",
|
|
197
|
-
"TSTypeAliasDeclaration",
|
|
198
197
|
"VariableStatement",
|
|
199
|
-
"TSInterfaceDeclaration",
|
|
200
|
-
"TSTypeAliasDeclaration TSPropertySignature",
|
|
201
|
-
"TSInterfaceDeclaration TSPropertySignature",
|
|
202
198
|
],
|
|
203
199
|
},
|
|
204
200
|
],
|
|
@@ -307,7 +307,7 @@ export default {
|
|
|
307
307
|
* Enforces new line after each method call in the chain to make it more readable and easy to maintain 🔧
|
|
308
308
|
* https://eslint.style/rules/newline-per-chained-call.
|
|
309
309
|
*/
|
|
310
|
-
"style/newline-per-chained-call": ["error", { ignoreChainWithDepth:
|
|
310
|
+
"style/newline-per-chained-call": ["error", { ignoreChainWithDepth: 4 }],
|
|
311
311
|
|
|
312
312
|
/**
|
|
313
313
|
* Disallow arrow functions where they could be confused with comparisons 🔧
|
|
@@ -290,13 +290,6 @@ export default {
|
|
|
290
290
|
*/
|
|
291
291
|
"typescript/no-import-type-side-effects": "error",
|
|
292
292
|
|
|
293
|
-
/**
|
|
294
|
-
* Disallow function declarations that contain unsafe references inside loop statements.
|
|
295
|
-
* Https://typescript-eslint.io/rules/no-loop-func.
|
|
296
|
-
*/
|
|
297
|
-
"no-loop-func": "off",
|
|
298
|
-
"typescript/no-loop-func": baseRules.rules["no-loop-func"],
|
|
299
|
-
|
|
300
293
|
/**
|
|
301
294
|
* Disallow the void operator except when used to discard a value 🔒 🔧 💡 💭
|
|
302
295
|
* https://typescript-eslint.io/rules/no-meaningless-void-operator.
|
|
@@ -364,13 +357,6 @@ export default {
|
|
|
364
357
|
*/
|
|
365
358
|
"typescript/return-await": "warn",
|
|
366
359
|
|
|
367
|
-
/**
|
|
368
|
-
* Disallow specified modules when loaded by import.
|
|
369
|
-
* Https://typescript-eslint.io/rules/no-restricted-imports.
|
|
370
|
-
*/
|
|
371
|
-
"no-restricted-imports": "off",
|
|
372
|
-
"typescript/no-restricted-imports": baseRules.rules["no-restricted-imports"],
|
|
373
|
-
|
|
374
360
|
/**
|
|
375
361
|
* Disallow variable declarations from shadowing variables declared in the outer scope
|
|
376
362
|
* https://typescript-eslint.io/rules/no-shadow.
|
|
@@ -568,7 +554,16 @@ export default {
|
|
|
568
554
|
* Enforce template literal expressions to be of string type ✅ 💭
|
|
569
555
|
* https://typescript-eslint.io/rules/.
|
|
570
556
|
*/
|
|
571
|
-
"typescript/restrict-template-expressions": "error",
|
|
557
|
+
"typescript/restrict-template-expressions": ["error",
|
|
558
|
+
{
|
|
559
|
+
allow: [{ name: ["Error", "URL", "URLSearchParams"], from: "lib" }],
|
|
560
|
+
allowAny: true,
|
|
561
|
+
allowBoolean: true,
|
|
562
|
+
allowNullish: true,
|
|
563
|
+
allowNumber: true,
|
|
564
|
+
allowRegExp: true,
|
|
565
|
+
},
|
|
566
|
+
],
|
|
572
567
|
|
|
573
568
|
/**
|
|
574
569
|
* Require switch-case statements to be exhaustive with union type 💡 💭
|