@prowise/eslint-config-linting-rules 0.0.4 → 0.0.5
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/backend.js
CHANGED
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.5","description":"Default Prowise linting rules for npm packages.","main":"index.js","exports":{"./typescript":"./typescript.js","./backend":"./backend.js","./frontend":"./frontend.js"},"scripts":{"lint":"eslint ."},"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.23.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","semver":"^7.3.7"}}
|
package/src/rules/base-rules.js
CHANGED
|
@@ -482,7 +482,7 @@ module.exports = {
|
|
|
482
482
|
* Enforces use of function declarations
|
|
483
483
|
* https://eslint.org/docs/latest/rules/func-style.
|
|
484
484
|
*/
|
|
485
|
-
"func-style": ["error", "declaration"],
|
|
485
|
+
"func-style": ["error", "declaration", { allowArrowFunctions: true }],
|
|
486
486
|
|
|
487
487
|
/**
|
|
488
488
|
* Require grouped accessor pairs in object literals and classes
|
|
@@ -300,7 +300,6 @@ module.exports = {
|
|
|
300
300
|
position: "before",
|
|
301
301
|
},
|
|
302
302
|
],
|
|
303
|
-
alphabetize: { order: "asc", caseInsensitive: true },
|
|
304
303
|
},
|
|
305
304
|
],
|
|
306
305
|
|
|
@@ -308,7 +307,7 @@ module.exports = {
|
|
|
308
307
|
* Require modules with a single export to use a default export
|
|
309
308
|
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/prefer-default-export.md.
|
|
310
309
|
*/
|
|
311
|
-
"import/prefer-default-export": "
|
|
310
|
+
"import/prefer-default-export": "off",
|
|
312
311
|
|
|
313
312
|
/**
|
|
314
313
|
* Warn if a module could be mistakenly parsed as a script by a consumer
|
|
@@ -130,7 +130,7 @@ module.exports = {
|
|
|
130
130
|
"react/function-component-definition": [
|
|
131
131
|
"error",
|
|
132
132
|
{
|
|
133
|
-
namedComponents: ["function-declaration", "function-expression"],
|
|
133
|
+
namedComponents: ["function-declaration", "function-expression", "arrow-function"],
|
|
134
134
|
unnamedComponents: "function-expression",
|
|
135
135
|
},
|
|
136
136
|
],
|
|
@@ -540,7 +540,7 @@ module.exports = {
|
|
|
540
540
|
* Disallow file extensions that may contain JSX
|
|
541
541
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md.
|
|
542
542
|
*/
|
|
543
|
-
"react/jsx-filename-extension": ["error", { extensions: [".jsx"] }],
|
|
543
|
+
"react/jsx-filename-extension": ["error", { extensions: [".jsx", ".tsx"] }],
|
|
544
544
|
|
|
545
545
|
/**
|
|
546
546
|
* Enforce proper position of the first property in JSX
|
|
@@ -676,13 +676,13 @@ module.exports = {
|
|
|
676
676
|
* Require private members to be marked as readonly if they"re never modified outside of the constructor 🔧 💭
|
|
677
677
|
* https://typescript-eslint.io/rules/prefer-readonly.
|
|
678
678
|
*/
|
|
679
|
-
"@typescript-eslint/prefer-readonly": "warn",
|
|
679
|
+
"@typescript-eslint/prefer-readonly": ["warn", { ignoreInferredTypes: true }],
|
|
680
680
|
|
|
681
681
|
/**
|
|
682
682
|
* Require function parameters to be typed as readonly to prevent accidental mutation of inputs 💭
|
|
683
683
|
* https://typescript-eslint.io/rules/prefer-readonly-parameter-types.
|
|
684
684
|
*/
|
|
685
|
-
"@typescript-eslint/prefer-readonly-parameter-types": "warn",
|
|
685
|
+
"@typescript-eslint/prefer-readonly-parameter-types": ["warn", { ignoreInferredTypes: true }],
|
|
686
686
|
|
|
687
687
|
/**
|
|
688
688
|
* Enforce using type parameter when calling Array#reduce instead of casting 🔒 🔧 💭
|