@prowise/eslint-config-linting-rules 0.0.3 → 0.0.4
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/frontend.js +6 -0
- package/index.js +9 -1
- package/package.json +1 -1
- package/src/rules/base-rules.js +13 -5
- package/src/rules/plugin-import-rules.js +7 -0
package/frontend.js
CHANGED
package/index.js
CHANGED
|
@@ -39,6 +39,14 @@ module.exports = {
|
|
|
39
39
|
"jest/no-identical-title": "error",
|
|
40
40
|
"jest/prefer-to-have-length": "warn",
|
|
41
41
|
"jest/valid-expect": "error",
|
|
42
|
-
"prettier/prettier": [
|
|
42
|
+
"prettier/prettier": [
|
|
43
|
+
"error",
|
|
44
|
+
{
|
|
45
|
+
singleQuote: false,
|
|
46
|
+
tabWidth: 4,
|
|
47
|
+
printWidth: 120,
|
|
48
|
+
trailingComma: "all",
|
|
49
|
+
},
|
|
50
|
+
],
|
|
43
51
|
},
|
|
44
52
|
};
|
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.4","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
|
@@ -545,7 +545,15 @@ module.exports = {
|
|
|
545
545
|
* Enforce a maximum function length
|
|
546
546
|
* https://eslint.org/docs/latest/rules/max-lines-per-function.
|
|
547
547
|
*/
|
|
548
|
-
"max-lines-per-function": [
|
|
548
|
+
"max-lines-per-function": [
|
|
549
|
+
"off",
|
|
550
|
+
{
|
|
551
|
+
max: 50,
|
|
552
|
+
skipBlankLines: true,
|
|
553
|
+
skipComments: true,
|
|
554
|
+
IIFEs: true,
|
|
555
|
+
},
|
|
556
|
+
],
|
|
549
557
|
|
|
550
558
|
/**
|
|
551
559
|
* Specify the maximum depth callbacks can be nested
|
|
@@ -1786,10 +1794,10 @@ module.exports = {
|
|
|
1786
1794
|
"object-curly-newline": [
|
|
1787
1795
|
"error",
|
|
1788
1796
|
{
|
|
1789
|
-
ObjectExpression: { minProperties:
|
|
1790
|
-
ObjectPattern: { minProperties:
|
|
1791
|
-
ImportDeclaration: { minProperties:
|
|
1792
|
-
ExportDeclaration: { minProperties:
|
|
1797
|
+
ObjectExpression: { minProperties: 4, multiline: true, consistent: true },
|
|
1798
|
+
ObjectPattern: { minProperties: 4, multiline: true, consistent: true },
|
|
1799
|
+
ImportDeclaration: { minProperties: 4, multiline: true, consistent: true },
|
|
1800
|
+
ExportDeclaration: { minProperties: 4, multiline: true, consistent: true },
|
|
1793
1801
|
},
|
|
1794
1802
|
],
|
|
1795
1803
|
|
|
@@ -293,6 +293,13 @@ module.exports = {
|
|
|
293
293
|
"error",
|
|
294
294
|
{
|
|
295
295
|
groups: [["builtin", "external", "internal"]],
|
|
296
|
+
pathGroups: [
|
|
297
|
+
{
|
|
298
|
+
pattern: "react",
|
|
299
|
+
group: "external",
|
|
300
|
+
position: "before",
|
|
301
|
+
},
|
|
302
|
+
],
|
|
296
303
|
alphabetize: { order: "asc", caseInsensitive: true },
|
|
297
304
|
},
|
|
298
305
|
],
|