@prowise/eslint-config-linting-rules 0.0.9 → 0.0.10
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":"0.0.
|
|
1
|
+
{"name":"@prowise/eslint-config-linting-rules","version":"0.0.10","description":"Default Prowise linting rules for npm packages.","main":"index.js","exports":{"./typescript":"./typescript.js","./backend":"./backend.js","./frontend":"./frontend.js"},"scripts":{"lint":"eslint **/*.js"},"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":{"@typescript-eslint/eslint-plugin":"^5.36.2","@typescript-eslint/parser":"^5.36.2","confusing-browser-globals":"^1.0.11","eslint":"^8.24.0","eslint-import-resolver-typescript":"^3.5.1","eslint-plugin-import":"^2.26.0","eslint-plugin-jest":"^27.0.1","eslint-plugin-jsdoc":"^39.3.6","eslint-plugin-node":"^11.1.0","eslint-plugin-prefer-arrow":"^1.2.3","eslint-plugin-prettier":"^4.2.1","eslint-plugin-react":"^7.31.7","eslint-plugin-react-hooks":"^4.6.0","object.assign":"^4.1.4","prettier":"^2.7.1"}}
|
package/src/rules/base-rules.js
CHANGED
|
@@ -364,8 +364,9 @@ module.exports = {
|
|
|
364
364
|
/**
|
|
365
365
|
* Enforces no braces where they can be omitted 🔧
|
|
366
366
|
* https://eslint.org/docs/latest/rules/arrow-body-style.
|
|
367
|
+
* Turned off => conflicting with the prettier rules.
|
|
367
368
|
*/
|
|
368
|
-
"arrow-body-style":
|
|
369
|
+
"arrow-body-style": "off",
|
|
369
370
|
|
|
370
371
|
/**
|
|
371
372
|
* Treat var statements as if they were block scoped
|
|
@@ -624,8 +625,9 @@ module.exports = {
|
|
|
624
625
|
/**
|
|
625
626
|
* Disallow arrow functions where they could be confused with comparisons 🔧
|
|
626
627
|
* https://eslint.org/docs/latest/rules/no-confusing-arrow.
|
|
628
|
+
* Turned off => conflicting with the prettier rules.
|
|
627
629
|
*/
|
|
628
|
-
"no-confusing-arrow":
|
|
630
|
+
"no-confusing-arrow": "off",
|
|
629
631
|
|
|
630
632
|
/**
|
|
631
633
|
* Disallow use of console
|
|
@@ -861,8 +863,9 @@ module.exports = {
|
|
|
861
863
|
/**
|
|
862
864
|
* Disallow nested ternary expressions
|
|
863
865
|
* https://eslint.org/docs/latest/rules/no-nested-ternary.
|
|
866
|
+
* Turned off => conflicting with the prettier rules.
|
|
864
867
|
*/
|
|
865
|
-
"no-nested-ternary": "
|
|
868
|
+
"no-nested-ternary": "off",
|
|
866
869
|
|
|
867
870
|
/**
|
|
868
871
|
* Disallow use of new operator when not part of the assignment or comparison
|
|
@@ -908,29 +911,9 @@ module.exports = {
|
|
|
908
911
|
|
|
909
912
|
/**
|
|
910
913
|
* Disallow reassignment of function parameters
|
|
911
|
-
* /**
|
|
912
|
-
* disallow parameter object manipulation except for specific exclusions
|
|
913
914
|
* https://eslint.org/docs/latest/rules/no-param-reassign.
|
|
914
915
|
*/
|
|
915
|
-
"no-param-reassign": [
|
|
916
|
-
"error",
|
|
917
|
-
{
|
|
918
|
-
props: true,
|
|
919
|
-
ignorePropertyModificationsFor: [
|
|
920
|
-
"acc", // for reduce accumulators
|
|
921
|
-
"accumulator", // for reduce accumulators
|
|
922
|
-
"e", // for e.returnvalue
|
|
923
|
-
"ctx", // for Koa routing
|
|
924
|
-
"context", // for Koa routing
|
|
925
|
-
"req", // for Express requests
|
|
926
|
-
"request", // for Express requests
|
|
927
|
-
"res", // for Express responses
|
|
928
|
-
"response", // for Express responses
|
|
929
|
-
"$scope", // for Angular 1 scopes
|
|
930
|
-
"staticContext", // for ReactRouter context
|
|
931
|
-
],
|
|
932
|
-
},
|
|
933
|
-
],
|
|
916
|
+
"no-param-reassign": ["error", { props: false }],
|
|
934
917
|
|
|
935
918
|
/**
|
|
936
919
|
* Disallow use of unary operators, ++ and --
|
|
@@ -1273,8 +1256,9 @@ module.exports = {
|
|
|
1273
1256
|
/**
|
|
1274
1257
|
* Suggest using arrow functions as callbacks 🔧
|
|
1275
1258
|
* https://eslint.org/docs/latest/rules/prefer-arrow-callback.
|
|
1259
|
+
* Turned off => conflicting with the prettier rules.
|
|
1276
1260
|
*/
|
|
1277
|
-
"prefer-arrow-callback":
|
|
1261
|
+
"prefer-arrow-callback": "off",
|
|
1278
1262
|
|
|
1279
1263
|
/**
|
|
1280
1264
|
* Suggest using of const declaration for variables that are never modified after declared 🔧
|
|
@@ -301,7 +301,7 @@ module.exports = {
|
|
|
301
301
|
* Disallow creating unstable components inside components
|
|
302
302
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unstable-nested-components.md.
|
|
303
303
|
*/
|
|
304
|
-
"react/no-unstable-nested-components": "error",
|
|
304
|
+
"react/no-unstable-nested-components": ["error", { allowProps: true }],
|
|
305
305
|
|
|
306
306
|
/**
|
|
307
307
|
* Disallow declaring unused methods of component class
|
|
@@ -634,7 +634,7 @@ module.exports = {
|
|
|
634
634
|
* Disallow problematic leaked values from being rendered 🔧
|
|
635
635
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-leaked-render.md.
|
|
636
636
|
*/
|
|
637
|
-
"react/jsx-no-leaked-render": "warn",
|
|
637
|
+
"react/jsx-no-leaked-render": ["warn", { validStrategies: ["coerce", "ternary"] }],
|
|
638
638
|
|
|
639
639
|
/**
|
|
640
640
|
* Disallow usage of string literals in JSX
|
|
@@ -349,7 +349,7 @@ module.exports = {
|
|
|
349
349
|
* Disallow classes used as namespaces 🔒
|
|
350
350
|
* https://typescript-eslint.io/rules/no-extraneous-class.
|
|
351
351
|
*/
|
|
352
|
-
"@typescript-eslint/no-extraneous-class": "
|
|
352
|
+
"@typescript-eslint/no-extraneous-class": "off",
|
|
353
353
|
|
|
354
354
|
/**
|
|
355
355
|
* Require Promise-like statements to be handled appropriately ✅ 💡 💭
|
|
@@ -428,7 +428,7 @@ module.exports = {
|
|
|
428
428
|
* Disallow Promises in places not designed to handle them ✅ 💭
|
|
429
429
|
* https://typescript-eslint.io/rules/no-misused-promises.
|
|
430
430
|
*/
|
|
431
|
-
"@typescript-eslint/no-misused-promises": "error",
|
|
431
|
+
"@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: false }],
|
|
432
432
|
|
|
433
433
|
/**
|
|
434
434
|
* Disallow custom TypeScript modules and namespaces ✅
|