@newsteam/eslint-config 1.2.13 → 1.2.14
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/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -24
- package/dist/plugins/array-function.js +5 -5
- package/dist/plugins/css-modules.js +2 -2
- package/dist/plugins/destructuring.js +2 -2
- package/dist/plugins/eslint-comments.js +19 -19
- package/dist/plugins/import-newlines.js +1 -1
- package/dist/plugins/import-x.js +19 -19
- package/dist/plugins/newline-destructuring.js +1 -1
- package/dist/plugins/next.js +21 -21
- package/dist/plugins/no-unsanitized.js +2 -2
- package/dist/plugins/no-useless-assign.js +1 -1
- package/dist/plugins/node.js +31 -31
- package/dist/plugins/perfectionist.d.ts.map +1 -1
- package/dist/plugins/perfectionist.js +21 -20
- package/dist/plugins/promise.js +13 -13
- package/dist/plugins/react-19-upgrade.js +7 -7
- package/dist/plugins/react-compiler.js +1 -1
- package/dist/plugins/react-hooks.js +22 -22
- package/dist/plugins/react-perf.js +1 -1
- package/dist/plugins/react-refresh.js +1 -1
- package/dist/plugins/react.js +69 -69
- package/dist/plugins/security.js +13 -13
- package/dist/plugins/sort-react-dependency-arrays.js +1 -1
- package/dist/plugins/stylistic.d.ts.map +1 -1
- package/dist/plugins/stylistic.js +102 -88
- package/dist/plugins/typescript.d.ts.map +1 -1
- package/dist/plugins/typescript.js +164 -126
- package/dist/plugins/unicorn.js +127 -127
- package/dist/rules.js +186 -186
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +0 -1
- package/package.json +38 -44
- package/dist/plugins/const-case.d.ts +0 -3
- package/dist/plugins/const-case.d.ts.map +0 -1
- package/dist/plugins/const-case.js +0 -16
- package/dist/plugins/more.d.ts +0 -3
- package/dist/plugins/more.d.ts.map +0 -1
- package/dist/plugins/more.js +0 -101
package/dist/settings.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAEhD,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAE5C,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,eAAO,MAAM,uBAAuB,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAEhD,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAE5C,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,eAAO,MAAM,uBAAuB;;;;;CAWnC,CAAC;AAEF,eAAO,MAAM,YAAY,aAAa,CAAC;AAEvC,eAAO,MAAM,aAAa,OAAO,CAAC"}
|
package/dist/settings.js
CHANGED
|
@@ -3,7 +3,6 @@ export const MAXIMUM_CYCLOMATIC_COMPLEXITY = 60;
|
|
|
3
3
|
export const MAXIMUM_FILE_LINE_COUNT = 1000;
|
|
4
4
|
export const MAXIMUM_LINE_LENGTH = 160;
|
|
5
5
|
export const MAX_FUNCTION_PARAMETERS = 5;
|
|
6
|
-
// eslint-disable-next-line const-case/uppercase -- acceptable
|
|
7
6
|
export const NO_MAGIC_NUMBERS_CONFIG = {
|
|
8
7
|
detectObjects: false,
|
|
9
8
|
ignore: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newsteam/eslint-config",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.14",
|
|
4
4
|
"description": "Shared config for eslint",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"build": "tsc --outDir 'dist_temp' && rsync -rt --delete ./dist_temp/ ./dist/ && rimraf dist_temp",
|
|
10
10
|
"clean": "rimraf dist .turbo",
|
|
11
|
-
"
|
|
12
|
-
"lint": "npm run lint:eslint && npm run depcheck && npm run prune",
|
|
11
|
+
"lint": "pnpm run lint:eslint && pnpm run prune",
|
|
13
12
|
"lint:eslint": "eslint --fix",
|
|
14
13
|
"lint:eslint:inspect": "eslint --inspect-config",
|
|
15
|
-
"prepublishOnly": "
|
|
16
|
-
"prune": "
|
|
14
|
+
"prepublishOnly": "pnpm run clean && pnpm run build && pnpm run lint && pnpm run test",
|
|
15
|
+
"prune": "cd ../.. && knip --use-tsconfig-files --no-exit-code --no-gitignore --workspace packages/eslint-config",
|
|
17
16
|
"reinstall": "rimraf node_modules package-lock.json pnpm-lock.yaml .turbo",
|
|
18
|
-
"test": "
|
|
17
|
+
"test": "pnpm run test:ts",
|
|
18
|
+
"test:timing": "TIMING=1 eslint --fix",
|
|
19
19
|
"test:ts": "tsc --noEmit"
|
|
20
20
|
},
|
|
21
21
|
"browserslist": "node 20",
|
|
@@ -52,49 +52,43 @@
|
|
|
52
52
|
"dist"
|
|
53
53
|
],
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@
|
|
56
|
-
"@
|
|
57
|
-
"@eslint/
|
|
58
|
-
"@next/eslint-plugin-next": "
|
|
59
|
-
"@stylistic/eslint-plugin": "
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"eslint-
|
|
64
|
-
"eslint-
|
|
65
|
-
"eslint-plugin-
|
|
66
|
-
"eslint-plugin-
|
|
67
|
-
"eslint-plugin-
|
|
68
|
-
"eslint-plugin-destructuring": "
|
|
69
|
-
"eslint-plugin-
|
|
70
|
-
"eslint-plugin-
|
|
71
|
-
"eslint-plugin-
|
|
72
|
-
"eslint-plugin-
|
|
73
|
-
"eslint-plugin-
|
|
74
|
-
"eslint-plugin-
|
|
75
|
-
"eslint-plugin-
|
|
76
|
-
"eslint-plugin-node": "^11.1.0",
|
|
77
|
-
"eslint-plugin-only-warn": "^1.1.0",
|
|
78
|
-
"eslint-plugin-perfectionist": "^4.15.1",
|
|
79
|
-
"eslint-plugin-promise": "^7.2.1",
|
|
80
|
-
"eslint-plugin-react": "^7.37.5",
|
|
81
|
-
"eslint-plugin-react-19-upgrade": "^1.7.0",
|
|
55
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.6.0",
|
|
56
|
+
"@eslint/compat": "2.0.2",
|
|
57
|
+
"@eslint/js": "^10.0.1",
|
|
58
|
+
"@next/eslint-plugin-next": "16.1.6",
|
|
59
|
+
"@stylistic/eslint-plugin": "5.8.0",
|
|
60
|
+
"confusing-browser-globals": "1.0.11",
|
|
61
|
+
"eslint-import-resolver-node": "0.3.9",
|
|
62
|
+
"eslint-import-resolver-typescript": "4.4.4",
|
|
63
|
+
"eslint-plugin-array-func": "5.1.0",
|
|
64
|
+
"eslint-plugin-css-modules": "2.12.0",
|
|
65
|
+
"eslint-plugin-destructuring": "2.2.1",
|
|
66
|
+
"eslint-plugin-import-newlines": "1.4.0",
|
|
67
|
+
"eslint-plugin-import-x": "4.16.1",
|
|
68
|
+
"eslint-plugin-newline-destructuring": "1.2.2",
|
|
69
|
+
"eslint-plugin-no-unsanitized": "4.1.4",
|
|
70
|
+
"eslint-plugin-no-useless-assign": "1.0.3",
|
|
71
|
+
"eslint-plugin-node": "11.1.0",
|
|
72
|
+
"eslint-plugin-perfectionist": "5.6.0",
|
|
73
|
+
"eslint-plugin-promise": "7.2.1",
|
|
74
|
+
"eslint-plugin-react": "7.37.5",
|
|
75
|
+
"eslint-plugin-react-19-upgrade": "1.7.0",
|
|
82
76
|
"eslint-plugin-react-compiler": "19.1.0-rc.2",
|
|
83
|
-
"eslint-plugin-react-hooks": "
|
|
84
|
-
"eslint-plugin-react-perf": "
|
|
85
|
-
"eslint-plugin-react-refresh": "
|
|
86
|
-
"eslint-plugin-security": "
|
|
87
|
-
"eslint-plugin-sort-react-dependency-arrays": "
|
|
88
|
-
"eslint-plugin-unicorn": "
|
|
89
|
-
"globals": "
|
|
90
|
-
"typescript-eslint": "
|
|
77
|
+
"eslint-plugin-react-hooks": "7.0.1",
|
|
78
|
+
"eslint-plugin-react-perf": "3.3.3",
|
|
79
|
+
"eslint-plugin-react-refresh": "0.5.0",
|
|
80
|
+
"eslint-plugin-security": "3.0.1",
|
|
81
|
+
"eslint-plugin-sort-react-dependency-arrays": "1.0.0",
|
|
82
|
+
"eslint-plugin-unicorn": "63.0.0",
|
|
83
|
+
"globals": "17.3.0",
|
|
84
|
+
"typescript-eslint": "8.56.0"
|
|
91
85
|
},
|
|
92
86
|
"peerDependencies": {
|
|
93
87
|
"eslint": ">= 9.35.0"
|
|
94
88
|
},
|
|
95
89
|
"devDependencies": {
|
|
96
|
-
"@types/eslint-plugin-security": "
|
|
97
|
-
"@types/node": "
|
|
98
|
-
"eslint": "
|
|
90
|
+
"@types/eslint-plugin-security": "3.0.1",
|
|
91
|
+
"@types/node": "25.2.3",
|
|
92
|
+
"eslint": "9.39.2"
|
|
99
93
|
}
|
|
100
94
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"const-case.d.ts","sourceRoot":"","sources":["../../src/plugins/const-case.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAQrC,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAS1C,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import constCase from "eslint-plugin-const-case";
|
|
2
|
-
/*
|
|
3
|
-
* Enforce capitalization of constant primitive literals.
|
|
4
|
-
*
|
|
5
|
-
* https://www.npmjs.com/package/eslint-plugin-const-case
|
|
6
|
-
*/
|
|
7
|
-
export const constCasePlugin = [
|
|
8
|
-
{
|
|
9
|
-
plugins: {
|
|
10
|
-
"const-case": constCase,
|
|
11
|
-
},
|
|
12
|
-
rules: {
|
|
13
|
-
"const-case/uppercase": "error",
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
];
|
package/dist/plugins/more.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"more.d.ts","sourceRoot":"","sources":["../../src/plugins/more.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAOrC,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EA0GrC,CAAC"}
|
package/dist/plugins/more.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { fixupPluginRules } from "@eslint/compat";
|
|
2
|
-
import more from "eslint-plugin-more";
|
|
3
|
-
/*
|
|
4
|
-
* Extra rules for Eslint
|
|
5
|
-
*
|
|
6
|
-
* https://www.npmjs.com/package/eslint-plugin-more
|
|
7
|
-
*/
|
|
8
|
-
export const morePlugin = [
|
|
9
|
-
{
|
|
10
|
-
plugins: {
|
|
11
|
-
more: fixupPluginRules(more),
|
|
12
|
-
},
|
|
13
|
-
rules: {
|
|
14
|
-
/*
|
|
15
|
-
* Prohibits an empty line at the beggining of a class body
|
|
16
|
-
*
|
|
17
|
-
* Plugin provides no schema for the rule, so the schema validation fails
|
|
18
|
-
*
|
|
19
|
-
* https://github.com/WebbyLab/eslint-plugin-more/blob/HEAD/docs/classbody-starts-with-newline.md
|
|
20
|
-
*/
|
|
21
|
-
"more/classbody-starts-with-newline": ["off"],
|
|
22
|
-
/*
|
|
23
|
-
* Forces the use of native methods instead of lodash/underscore
|
|
24
|
-
*
|
|
25
|
-
* https://github.com/WebbyLab/eslint-plugin-more/blob/HEAD/docs/force-native-methods.md
|
|
26
|
-
*/
|
|
27
|
-
"more/force-native-methods": "error",
|
|
28
|
-
/*
|
|
29
|
-
* Prohibits the use of 'For loop' with ++ or +=
|
|
30
|
-
*
|
|
31
|
-
* https://github.com/WebbyLab/eslint-plugin-more/blob/HEAD/docs/no-c-like-loops.md
|
|
32
|
-
*/
|
|
33
|
-
"more/no-c-like-loops": "error",
|
|
34
|
-
/*
|
|
35
|
-
* Prohibits the duplication of long chains like this.props.user.name
|
|
36
|
-
*
|
|
37
|
-
* This is anoying in practice so we're turning it off
|
|
38
|
-
*
|
|
39
|
-
* https://github.com/WebbyLab/eslint-plugin-more/blob/HEAD/docs/no-duplicated-chains.md
|
|
40
|
-
*/
|
|
41
|
-
"more/no-duplicated-chains": "off",
|
|
42
|
-
/*
|
|
43
|
-
* Prohibits using Array.prototype.filter to find one element and asks to use 'find' instead.
|
|
44
|
-
*
|
|
45
|
-
* https://github.com/WebbyLab/eslint-plugin-more/blob/HEAD/docs/no-filter-instead-of-find.md
|
|
46
|
-
*/
|
|
47
|
-
"more/no-filter-instead-of-find": "error",
|
|
48
|
-
/*
|
|
49
|
-
* Prohibits using hardcoded configuration data.
|
|
50
|
-
*
|
|
51
|
-
* This is off by default because it makes too many false positives
|
|
52
|
-
*
|
|
53
|
-
* https://github.com/WebbyLab/eslint-plugin-more/blob/HEAD/docs/no-hardcoded-configuration-data.md
|
|
54
|
-
*/
|
|
55
|
-
"more/no-hardcoded-configuration-data": "off",
|
|
56
|
-
/*
|
|
57
|
-
* Prohibits using hardcoded passwords.
|
|
58
|
-
*
|
|
59
|
-
* This is off by default because it makes too many false positives
|
|
60
|
-
* https://github.com/WebbyLab/eslint-plugin-more/blob/HEAD/docs/no-hardcoded-password.md
|
|
61
|
-
*/
|
|
62
|
-
"more/no-hardcoded-password": "off",
|
|
63
|
-
/*
|
|
64
|
-
* Prohibits the use of variables that end in numerics.
|
|
65
|
-
*
|
|
66
|
-
* https://github.com/WebbyLab/eslint-plugin-more/blob/HEAD/docs/no-numeric-endings-for-variables.md
|
|
67
|
-
*/
|
|
68
|
-
"more/no-numeric-endings-for-variables": "error",
|
|
69
|
-
/*
|
|
70
|
-
* Forces the use of async / await instead of then
|
|
71
|
-
*
|
|
72
|
-
* https://github.com/WebbyLab/eslint-plugin-more/blob/HEAD/docs/no-then.md
|
|
73
|
-
*/
|
|
74
|
-
"more/no-then": "error",
|
|
75
|
-
/*
|
|
76
|
-
* Prohibits the use of array.map without variable or property
|
|
77
|
-
*
|
|
78
|
-
* https://github.com/WebbyLab/eslint-plugin-more/blob/HEAD/docs/no-void-map.md
|
|
79
|
-
*/
|
|
80
|
-
"more/no-void-map": "error",
|
|
81
|
-
/*
|
|
82
|
-
* Prohibits the usage of window global
|
|
83
|
-
*
|
|
84
|
-
* Off because we need to use window
|
|
85
|
-
*
|
|
86
|
-
* https://github.com/WebbyLab/eslint-plugin-more/blob/HEAD/docs/no-window.md
|
|
87
|
-
*/
|
|
88
|
-
"more/no-window": "off",
|
|
89
|
-
/*
|
|
90
|
-
* Prohibits the use of comparison array.indexOf() == -1 and ask to use 'includes' instead
|
|
91
|
-
*
|
|
92
|
-
* This rule has a bug in it preventing eslint from running correctly
|
|
93
|
-
* https://github.com/WebbyLab/eslint-plugin-more/issues/44
|
|
94
|
-
* Turing it off until this issue is resolved
|
|
95
|
-
*
|
|
96
|
-
* https://github.com/WebbyLab/eslint-plugin-more/blob/HEAD/docs/prefer-includes.md
|
|
97
|
-
*/
|
|
98
|
-
"more/prefer-includes": "off",
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
];
|