@newsteam/eslint-config 1.2.18 → 1.2.20
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.map +1 -1
- package/dist/index.js +1 -0
- package/dist/plugins/sort-react-dependency-arrays.d.ts.map +1 -1
- package/dist/plugins/sort-react-dependency-arrays.js +33 -32
- package/dist/rules/css-modules.js +4 -4
- package/dist/rules/eslint-comments.d.ts.map +1 -1
- package/dist/rules/eslint-comments.js +0 -6
- package/dist/rules/import-newlines.js +1 -1
- package/dist/rules/import-x.d.ts.map +1 -1
- package/dist/rules/import-x.js +8 -10
- package/dist/rules/index.d.ts.map +1 -1
- package/dist/rules/index.js +19 -14
- package/dist/rules/next.js +1 -1
- package/dist/rules/perfectionist.d.ts.map +1 -1
- package/dist/rules/perfectionist.js +2 -0
- package/dist/rules/react-19-upgrade.d.ts.map +1 -1
- package/dist/rules/react-19-upgrade.js +7 -0
- package/dist/rules/react-hooks.d.ts.map +1 -1
- package/dist/rules/react-hooks.js +9 -11
- package/dist/rules/react-performance.d.ts +3 -0
- package/dist/rules/react-performance.d.ts.map +1 -0
- package/dist/rules/{react-perf.js → react-performance.js} +1 -1
- package/dist/rules/react.d.ts.map +1 -1
- package/dist/rules/react.js +14 -12
- package/dist/rules/security.js +6 -6
- package/dist/rules/stylistic.d.ts.map +1 -1
- package/dist/rules/stylistic.js +96 -109
- package/dist/rules/typescript.d.ts.map +1 -1
- package/dist/rules/typescript.js +14 -1
- package/dist/rules/unicorn.d.ts.map +1 -1
- package/dist/rules/unicorn.js +1239 -80
- package/dist/settings.d.ts +2 -2
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +2 -2
- package/package.json +35 -33
- package/dist/rules/no-unsanitized.d.ts +0 -3
- package/dist/rules/no-unsanitized.d.ts.map +0 -1
- package/dist/rules/no-unsanitized.js +0 -38
- package/dist/rules/react-compiler.d.ts +0 -3
- package/dist/rules/react-compiler.d.ts.map +0 -1
- package/dist/rules/react-compiler.js +0 -14
- package/dist/rules/react-perf.d.ts +0 -3
- package/dist/rules/react-perf.d.ts.map +0 -1
package/dist/settings.d.ts
CHANGED
|
@@ -9,6 +9,6 @@ export declare const NO_MAGIC_NUMBERS_CONFIG: {
|
|
|
9
9
|
ignoreArrayIndexes: boolean;
|
|
10
10
|
ignoreDefaultValues: boolean;
|
|
11
11
|
};
|
|
12
|
-
export declare const NODE_VERSION = ">=
|
|
13
|
-
export declare const REACT_VERSION = "
|
|
12
|
+
export declare const NODE_VERSION = ">=24.16.0";
|
|
13
|
+
export declare const REACT_VERSION = "19.2.17";
|
|
14
14
|
//# sourceMappingURL=settings.d.ts.map
|
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;AAEzC,eAAO,MAAM,uBAAuB
|
|
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;IAChC,aAAa;IACb,MAAM;IAON,kBAAkB;IAClB,mBAAmB;CACtB,CAAC;AAEF,eAAO,MAAM,YAAY,cAAc,CAAC;AAExC,eAAO,MAAM,aAAa,YAAY,CAAC"}
|
package/dist/settings.js
CHANGED
|
@@ -15,5 +15,5 @@ export const NO_MAGIC_NUMBERS_CONFIG = {
|
|
|
15
15
|
ignoreArrayIndexes: true,
|
|
16
16
|
ignoreDefaultValues: true,
|
|
17
17
|
};
|
|
18
|
-
export const NODE_VERSION = ">=
|
|
19
|
-
export const REACT_VERSION = "
|
|
18
|
+
export const NODE_VERSION = ">=24.16.0";
|
|
19
|
+
export const REACT_VERSION = "19.2.17";
|
package/package.json
CHANGED
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newsteam/eslint-config",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.20",
|
|
4
4
|
"description": "Shared config for eslint",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"build": "tsc --outDir 'dist_temp' && rsync -rt --delete ./dist_temp/ ./dist/ && rimraf dist_temp",
|
|
10
|
+
"check": "pnpm run check:ts",
|
|
11
|
+
"check:eslint-timing": "TIMING=1 eslint --fix",
|
|
12
|
+
"check:ts": "tsc --noEmit",
|
|
10
13
|
"clean": "rimraf dist .turbo",
|
|
11
|
-
"lint": "pnpm run lint:
|
|
12
|
-
"lint:
|
|
13
|
-
"lint:eslint
|
|
14
|
+
"lint": "pnpm run lint:ts",
|
|
15
|
+
"lint:ts": "pnpm run lint:ts:eslint && pnpm run lint:ts:knip",
|
|
16
|
+
"lint:ts:eslint": "eslint --fix",
|
|
17
|
+
"lint:ts:eslint:inspect": "eslint --inspect-config",
|
|
18
|
+
"lint:ts:eslint:safe": "eslint",
|
|
19
|
+
"lint:ts:knip": "knip --use-tsconfig-files --no-exit-code --no-gitignore",
|
|
14
20
|
"prepublishOnly": "pnpm run clean && pnpm run build && pnpm run lint && pnpm run test",
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"test": "pnpm run test:ts",
|
|
18
|
-
"test:timing": "TIMING=1 eslint --fix",
|
|
19
|
-
"test:ts": "tsc --noEmit"
|
|
21
|
+
"test": "pnpm run check",
|
|
22
|
+
"test:ts": "pnpm run check:ts"
|
|
20
23
|
},
|
|
21
24
|
"browserslist": "node 20",
|
|
22
25
|
"engines": {
|
|
@@ -52,41 +55,40 @@
|
|
|
52
55
|
"dist"
|
|
53
56
|
],
|
|
54
57
|
"dependencies": {
|
|
55
|
-
"@bhollis/eslint-plugin-css-modules": "^1.0.
|
|
56
|
-
"@eslint-community/eslint-plugin-eslint-comments": "^4.
|
|
57
|
-
"@eslint/compat": "2.0
|
|
58
|
-
"@next/eslint-plugin-next": "16.
|
|
59
|
-
"@stylistic/eslint-plugin": "5.
|
|
60
|
-
"
|
|
61
|
-
"eslint-import-resolver-
|
|
62
|
-
"eslint-
|
|
63
|
-
"eslint-plugin-array-func": "5.1.0",
|
|
58
|
+
"@bhollis/eslint-plugin-css-modules": "^1.0.1",
|
|
59
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.7.2",
|
|
60
|
+
"@eslint/compat": "2.1.0",
|
|
61
|
+
"@next/eslint-plugin-next": "16.2.10",
|
|
62
|
+
"@stylistic/eslint-plugin": "5.10.0",
|
|
63
|
+
"eslint-import-resolver-node": "0.4.0",
|
|
64
|
+
"eslint-import-resolver-typescript": "4.4.5",
|
|
65
|
+
"eslint-plugin-array-func": "5.1.1",
|
|
64
66
|
"eslint-plugin-destructuring": "2.2.1",
|
|
65
67
|
"eslint-plugin-import-newlines": "2.0.0",
|
|
66
|
-
"eslint-plugin-import-x": "4.
|
|
67
|
-
"eslint-plugin-no-unsanitized": "4.1.5",
|
|
68
|
+
"eslint-plugin-import-x": "4.17.1",
|
|
68
69
|
"eslint-plugin-no-useless-assign": "1.0.3",
|
|
69
70
|
"eslint-plugin-node": "11.1.0",
|
|
70
|
-
"eslint-plugin-perfectionist": "5.
|
|
71
|
-
"eslint-plugin-promise": "7.
|
|
71
|
+
"eslint-plugin-perfectionist": "5.10.0",
|
|
72
|
+
"eslint-plugin-promise": "7.3.0",
|
|
72
73
|
"eslint-plugin-react": "7.37.5",
|
|
73
|
-
"eslint-plugin-react-19-upgrade": "1.
|
|
74
|
-
"eslint-plugin-react-
|
|
75
|
-
"eslint-plugin-react-hooks": "7.0.1",
|
|
74
|
+
"eslint-plugin-react-19-upgrade": "1.10.0",
|
|
75
|
+
"eslint-plugin-react-hooks": "7.1.1",
|
|
76
76
|
"eslint-plugin-react-perf": "3.3.3",
|
|
77
|
-
"eslint-plugin-react-refresh": "0.5.
|
|
78
|
-
"eslint-plugin-security": "4.0.
|
|
79
|
-
"eslint-plugin-unicorn": "
|
|
80
|
-
"globals": "17.
|
|
81
|
-
"typescript-eslint": "8.
|
|
77
|
+
"eslint-plugin-react-refresh": "0.5.3",
|
|
78
|
+
"eslint-plugin-security": "4.0.1",
|
|
79
|
+
"eslint-plugin-unicorn": "71.1.0",
|
|
80
|
+
"globals": "17.7.0",
|
|
81
|
+
"typescript-eslint": "8.63.0"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
84
|
"eslint": ">= 10.0.0"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
87
|
"@types/eslint-plugin-security": "3.0.1",
|
|
88
|
-
"@types/node": "
|
|
89
|
-
"@typescript-eslint/utils": "^8.
|
|
90
|
-
"
|
|
88
|
+
"@types/node": "26.1.1",
|
|
89
|
+
"@typescript-eslint/utils": "^8.63.0",
|
|
90
|
+
"@typescript/native": "npm:typescript@^7.0.2",
|
|
91
|
+
"eslint": "10.7.0",
|
|
92
|
+
"typescript": "npm:@typescript/typescript6@^6.0.2"
|
|
91
93
|
}
|
|
92
94
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"no-unsanitized.d.ts","sourceRoot":"","sources":["../../src/rules/no-unsanitized.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGrC,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MA6B9C,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* These rules disallow unsafe coding practices that may result into security
|
|
3
|
-
* vulnerabilities. We will disallow assignments (e.g., to innerHTML) as well as
|
|
4
|
-
* calls (e.g., to insertAdjacentHTML) without the use of a pre-defined escaping
|
|
5
|
-
* function. The escaping functions must be called with a template string. The
|
|
6
|
-
* function names are hardcoded as Sanitizer.escapeHTML and escapeHTML.
|
|
7
|
-
*
|
|
8
|
-
* https://www.npmjs.com/package/eslint-plugin-no-unsanitized
|
|
9
|
-
*/
|
|
10
|
-
import { fixupPluginRules } from "@eslint/compat";
|
|
11
|
-
import plugin from "eslint-plugin-no-unsanitized";
|
|
12
|
-
export const noUnsanitizedPluginConfig = {
|
|
13
|
-
plugins: {
|
|
14
|
-
"no-unsanitized": fixupPluginRules(plugin),
|
|
15
|
-
},
|
|
16
|
-
rules: {
|
|
17
|
-
/*
|
|
18
|
-
* The method rule in eslint-plugin-no-unsanitized perform basic security
|
|
19
|
-
* checks for function calls. The idea of these checks is to ensure that
|
|
20
|
-
* certain insecure coding patterns are avoided in your codebase. We
|
|
21
|
-
* encourage developers to use HTML sanitizers or escapers to mitigate
|
|
22
|
-
* those insecure patterns.
|
|
23
|
-
*
|
|
24
|
-
* https://github.com/mozilla/eslint-plugin-no-unsanitized/blob/master/docs/rules/method.md
|
|
25
|
-
*/
|
|
26
|
-
"no-unsanitized/method": "warn",
|
|
27
|
-
/*
|
|
28
|
-
* The property rule in eslint-plugin-no-unsanitized perform basic security
|
|
29
|
-
* checks for property assignments. The idea of these checks is to ensure
|
|
30
|
-
* that certain insecure coding patterns are avoided in your codebase.
|
|
31
|
-
* We encourage developers to use HTML sanitizers or escapers to mitigate
|
|
32
|
-
* those insecure patterns.
|
|
33
|
-
*
|
|
34
|
-
* https://github.com/mozilla/eslint-plugin-no-unsanitized/blob/master/docs/rules/property.md
|
|
35
|
-
*/
|
|
36
|
-
"no-unsanitized/property": "warn",
|
|
37
|
-
},
|
|
38
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react-compiler.d.ts","sourceRoot":"","sources":["../../src/rules/react-compiler.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAQrC,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAO9C,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import reactCompiler from "eslint-plugin-react-compiler";
|
|
2
|
-
/*
|
|
3
|
-
* ESLint plugin surfacing problematic React code found by the React compiler.
|
|
4
|
-
*
|
|
5
|
-
* https://www.npmjs.com/package/eslint-plugin-react-compiler
|
|
6
|
-
*/
|
|
7
|
-
export const reactCompilerPluginConfig = {
|
|
8
|
-
plugins: {
|
|
9
|
-
"react-compiler": reactCompiler,
|
|
10
|
-
},
|
|
11
|
-
rules: {
|
|
12
|
-
"react-compiler/react-compiler": "warn",
|
|
13
|
-
},
|
|
14
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react-perf.d.ts","sourceRoot":"","sources":["../../src/rules/react-perf.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AASrC,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MA0C1C,CAAC"}
|