@mi11er/eslint-config 2.4.1 → 3.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/CHANGELOG.md +56 -0
- package/README.md +0 -1
- package/index.js +5 -9
- package/package.json +61 -63
- package/react.js +10 -9
- package/rules/base.js +23 -31
- package/rules/node.js +38 -44
- package/rules/prettier.js +2 -4
- package/rules/react.js +19 -11
- package/rules/security.js +31 -71
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,59 @@
|
|
|
1
|
+
## [3.0.4](https://github.com/mi11er-net/eslint-config/compare/v3.0.3...v3.0.4) (2026-06-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** remove unused eslint-index and resolve all audit vulnerabilities ([138b28d](https://github.com/mi11er-net/eslint-config/commit/138b28d8fa21613c0530466d7cdb4b978d984b15))
|
|
7
|
+
|
|
8
|
+
## [3.0.3](https://github.com/mi11er-net/eslint-config/compare/v3.0.2...v3.0.3) (2026-06-14)
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
- **ci:** remove --provenance flag; npm provenance does not support CircleCI ([197abe4](https://github.com/mi11er-net/eslint-config/commit/197abe41beb7b750a048de0adde11209e2eda5d2))
|
|
13
|
+
|
|
14
|
+
## [3.0.2](https://github.com/mi11er-net/eslint-config/compare/v3.0.1...v3.0.2) (2026-06-14)
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
- **ci:** force 3.0.2 release after failed 3.0.1 publish attempts ([ec26627](https://github.com/mi11er-net/eslint-config/commit/ec2662784da949b81a91fef38a680bc9d2735327))
|
|
19
|
+
|
|
20
|
+
## [3.0.1](https://github.com/mi11er-net/eslint-config/compare/v3.0.0...v3.0.1) (2026-06-14)
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
- **ci:** use ./release path prefix for npm publish to avoid GitHub shorthand interpretation ([a7ffbd3](https://github.com/mi11er-net/eslint-config/commit/a7ffbd357a231774586ad9cabf67a71473435e16))
|
|
25
|
+
|
|
26
|
+
# [3.0.0](https://github.com/mi11er-net/eslint-config/compare/v2.4.1...v3.0.0) (2026-06-14)
|
|
27
|
+
|
|
28
|
+
- feat!: prepare v3.0.0 — ESLint 10, dep bumps, legacy-peer-deps ([ab9657a](https://github.com/mi11er-net/eslint-config/commit/ab9657afe4cc0690f1b555083142614135d845db)), closes [#226](https://github.com/mi11er-net/eslint-config/issues/226)
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
- **ci:** bypass @semantic-release/npm auth using exec + npm publish directly ([665d9f3](https://github.com/mi11er-net/eslint-config/commit/665d9f39d559d4e6aa984d2b68fbfd57f3a27d9b)), closes [semantic-release/npm#1121](https://github.com/semantic-release/npm/issues/1121)
|
|
33
|
+
- **ci:** mkdir -p release before npm pack (directory is gitignored) ([eafe689](https://github.com/mi11er-net/eslint-config/commit/eafe689df9fdf37c0a8d3657cbde41063729cf83))
|
|
34
|
+
- **ci:** switch npm publish to OIDC trusted publishing ([748b0e4](https://github.com/mi11er-net/eslint-config/commit/748b0e4b2a7c85ac70ac94033781fd973e5505cd))
|
|
35
|
+
- **ci:** upgrade semantic-release stack and pin Node for OIDC support ([96c400c](https://github.com/mi11er-net/eslint-config/commit/96c400cde5dd6108b28dc69046f1e3df30a91764))
|
|
36
|
+
- **deps:** update dependency eslint-config-airbnb to v17.1.1 ([4730d2e](https://github.com/mi11er-net/eslint-config/commit/4730d2e43991d79b27384f8a584d232127251d9c))
|
|
37
|
+
- **deps:** update dependency eslint-config-airbnb-base to v13.2.0 ([095f13e](https://github.com/mi11er-net/eslint-config/commit/095f13ec02273a85db1b945bef3661741c362851))
|
|
38
|
+
- **deps:** update dependency eslint-config-prettier to v4.3.0 ([e8b6f3a](https://github.com/mi11er-net/eslint-config/commit/e8b6f3af995970d1353b5334d09caa9832dcd68a))
|
|
39
|
+
- **deps:** update eslint monorepo to v10 ([d49bd98](https://github.com/mi11er-net/eslint-config/commit/d49bd98fa70b170bca9079a176ea3bd189b1efb9))
|
|
40
|
+
|
|
41
|
+
### Features
|
|
42
|
+
|
|
43
|
+
- convert package to ESM (Phase 2) ([dc1483c](https://github.com/mi11er-net/eslint-config/commit/dc1483c59297fba8ca4f18054bdbfae79deb74b0)), closes [#225](https://github.com/mi11er-net/eslint-config/issues/225)
|
|
44
|
+
- migrate to ESLint flat config format (Phase 1) ([c3213ff](https://github.com/mi11er-net/eslint-config/commit/c3213ffabc0a7ee2484a0185f255495f7826a90f)), closes [#224](https://github.com/mi11er-net/eslint-config/issues/224)
|
|
45
|
+
|
|
46
|
+
### BREAKING CHANGES
|
|
47
|
+
|
|
48
|
+
- Package now requires flat config (no eslintrc support).
|
|
49
|
+
Consumers must use eslint.config.js (or .mjs) with ESM import syntax.
|
|
50
|
+
ESLint 8 is no longer supported. Peer dep changes:
|
|
51
|
+
|
|
52
|
+
* eslint ^9.0.0 || ^10.0.0 (was ^8.23.0 || ^9.0.0 || ^10.0.0)
|
|
53
|
+
* eslint-plugin-import-x ^4.0.0 (replaces eslint-plugin-import)
|
|
54
|
+
* eslint-plugin-react-hooks ^7.0.0 (was ^4.3.0)
|
|
55
|
+
* eslint-plugin-scanjs-rules removed (unmaintained, no flat config support)
|
|
56
|
+
|
|
1
57
|
## [2.4.1](https://github.com/mi11er-net/eslint-config/compare/v2.4.0...v2.4.1) (2019-04-01)
|
|
2
58
|
|
|
3
59
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://app.codacy.com/app/mi11er/eslint-config?utm_source=github.com&utm_medium=referral&utm_content=mi11er-net/eslint-config&utm_campaign=badger)
|
|
4
4
|
[](https://travis-ci.org/mi11er-net/eslint-config)
|
|
5
|
-
[](https://nodesecurity.io/orgs/mi11er/projects/8e377034-82a1-4a76-89fa-f30d1ef9a513)
|
|
6
5
|
|
|
7
6
|
Combines various plugins and rulesets for use in mi11er.net projects.
|
|
8
7
|
|
package/index.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
'./rules/prettier',
|
|
6
|
-
].map(require.resolve);
|
|
1
|
+
import baseRules from './rules/base.js';
|
|
2
|
+
import nodeRules from './rules/node.js';
|
|
3
|
+
import securityRules from './rules/security.js';
|
|
4
|
+
import prettierRules from './rules/prettier.js';
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
extends: extendedConfigs,
|
|
10
|
-
};
|
|
6
|
+
export default [...baseRules, ...nodeRules, ...securityRules, ...prettierRules];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mi11er/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"description": "@mi11er/eslint-config combines various plugins and rulesets for use in mi11er.net projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"author": "Matthew Miller <matthew@mi11er.net> (https://mi11er.net)",
|
|
19
19
|
"contributors": [],
|
|
20
|
+
"type": "module",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": "./index.js",
|
|
23
|
+
"./react": "./react.js"
|
|
24
|
+
},
|
|
20
25
|
"files": [
|
|
21
26
|
"package.json",
|
|
22
27
|
"README.md",
|
|
@@ -26,78 +31,23 @@
|
|
|
26
31
|
"react.js",
|
|
27
32
|
"rules"
|
|
28
33
|
],
|
|
29
|
-
"main": "index.js",
|
|
30
34
|
"scripts": {
|
|
31
|
-
"audit": "
|
|
35
|
+
"audit": "node scripts/audit.cjs",
|
|
32
36
|
"lint": "eslint --fix .",
|
|
33
37
|
"lint-staged": "lint-staged",
|
|
38
|
+
"prepare": "husky",
|
|
34
39
|
"pretty-quick": "pretty-quick --staged",
|
|
35
40
|
"test": "run-s lint audit"
|
|
36
41
|
},
|
|
37
|
-
"husky": {
|
|
38
|
-
"hooks": {
|
|
39
|
-
"pre-commit": "run-s lint-staged pretty-quick audit"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"config": {
|
|
43
|
-
"commitizen": {
|
|
44
|
-
"path": "./node_modules/cz-conventional-changelog"
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
"dependencies": {
|
|
48
|
-
"eslint-config-airbnb": "17.1.0",
|
|
49
|
-
"eslint-config-airbnb-base": "13.1.0",
|
|
50
|
-
"eslint-config-prettier": "4.1.0"
|
|
51
|
-
},
|
|
52
|
-
"devDependencies": {
|
|
53
|
-
"@capaj/npm-audit-ci": "1.0.5",
|
|
54
|
-
"@semantic-release/changelog": "3.0.2",
|
|
55
|
-
"@semantic-release/exec": "3.3.2",
|
|
56
|
-
"@semantic-release/git": "7.0.8",
|
|
57
|
-
"commitizen": "3.0.7",
|
|
58
|
-
"cz-conventional-changelog": "2.1.0",
|
|
59
|
-
"eslint": "5.16.0",
|
|
60
|
-
"eslint-index": "1.5.0",
|
|
61
|
-
"eslint-plugin-import": "2.16.0",
|
|
62
|
-
"eslint-plugin-jsx-a11y": "6.2.1",
|
|
63
|
-
"eslint-plugin-no-unsafe-innerhtml": "1.0.16",
|
|
64
|
-
"eslint-plugin-node": "8.0.1",
|
|
65
|
-
"eslint-plugin-optimize-regex": "1.1.6",
|
|
66
|
-
"eslint-plugin-react": "7.12.4",
|
|
67
|
-
"eslint-plugin-scanjs-rules": "0.2.1",
|
|
68
|
-
"eslint-plugin-security": "1.4.0",
|
|
69
|
-
"husky": "1.3.1",
|
|
70
|
-
"lint-staged": "8.1.5",
|
|
71
|
-
"npm-run-all": "4.1.5",
|
|
72
|
-
"prettier": "1.16.4",
|
|
73
|
-
"pretty-quick": "1.10.0",
|
|
74
|
-
"semantic-release": "15.13.3",
|
|
75
|
-
"sort-package-json": "1.22.1"
|
|
76
|
-
},
|
|
77
|
-
"peerDependencies": {
|
|
78
|
-
"eslint": "^4.19.1 || ^5.0.0",
|
|
79
|
-
"eslint-plugin-import": "^2.10.0",
|
|
80
|
-
"eslint-plugin-jsx-a11y": "^6.0.3",
|
|
81
|
-
"eslint-plugin-no-unsafe-innerhtml": "^1.0.16",
|
|
82
|
-
"eslint-plugin-node": "^6.0.1 || ^7.0.0 || ^8.0.0",
|
|
83
|
-
"eslint-plugin-optimize-regex": "^1.1.5",
|
|
84
|
-
"eslint-plugin-react": "^7.7.0",
|
|
85
|
-
"eslint-plugin-scanjs-rules": "^0.2.1",
|
|
86
|
-
"eslint-plugin-security": "^1.4.0"
|
|
87
|
-
},
|
|
88
42
|
"release": {
|
|
89
|
-
"
|
|
90
|
-
|
|
91
|
-
"@semantic-release/changelog",
|
|
92
|
-
"@semantic-release/npm",
|
|
93
|
-
"@semantic-release/git",
|
|
94
|
-
"@semantic-release/github"
|
|
43
|
+
"branches": [
|
|
44
|
+
"master"
|
|
95
45
|
],
|
|
96
46
|
"prepare": [
|
|
97
47
|
"@semantic-release/changelog",
|
|
98
48
|
{
|
|
99
|
-
"path": "@semantic-release/
|
|
100
|
-
"
|
|
49
|
+
"path": "@semantic-release/exec",
|
|
50
|
+
"cmd": "npm --no-git-tag-version version ${nextRelease.version} && mkdir -p release && npm pack --pack-destination release"
|
|
101
51
|
},
|
|
102
52
|
{
|
|
103
53
|
"path": "@semantic-release/exec",
|
|
@@ -117,7 +67,10 @@
|
|
|
117
67
|
}
|
|
118
68
|
],
|
|
119
69
|
"publish": [
|
|
120
|
-
|
|
70
|
+
{
|
|
71
|
+
"path": "@semantic-release/exec",
|
|
72
|
+
"cmd": "npm publish ./release/*.tgz"
|
|
73
|
+
},
|
|
121
74
|
{
|
|
122
75
|
"path": "@semantic-release/github",
|
|
123
76
|
"assets": [
|
|
@@ -127,6 +80,51 @@
|
|
|
127
80
|
}
|
|
128
81
|
]
|
|
129
82
|
}
|
|
83
|
+
],
|
|
84
|
+
"verifyConditions": [
|
|
85
|
+
"@semantic-release/changelog",
|
|
86
|
+
"@semantic-release/git",
|
|
87
|
+
"@semantic-release/github"
|
|
130
88
|
]
|
|
89
|
+
},
|
|
90
|
+
"dependencies": {
|
|
91
|
+
"@eslint/js": "^10.0.0",
|
|
92
|
+
"eslint-config-prettier": "^10.1.8",
|
|
93
|
+
"globals": "^17.0.0"
|
|
94
|
+
},
|
|
95
|
+
"devDependencies": {
|
|
96
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
97
|
+
"@semantic-release/exec": "^7.1.0",
|
|
98
|
+
"@semantic-release/git": "^10.0.1",
|
|
99
|
+
"@semantic-release/github": "^12.0.8",
|
|
100
|
+
"commitizen": "4.3.2",
|
|
101
|
+
"cz-conventional-changelog": "3.3.0",
|
|
102
|
+
"eslint": "^10.0.0",
|
|
103
|
+
"eslint-plugin-import-x": "^4.16.2",
|
|
104
|
+
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
105
|
+
"eslint-plugin-n": "^18.0.0",
|
|
106
|
+
"eslint-plugin-no-unsanitized": "^4.1.4",
|
|
107
|
+
"eslint-plugin-optimize-regex": "1.2.1",
|
|
108
|
+
"eslint-plugin-react": "7.37.5",
|
|
109
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
110
|
+
"eslint-plugin-security": "^4.0.0",
|
|
111
|
+
"husky": "^9.1.7",
|
|
112
|
+
"lint-staged": "^17.0.0",
|
|
113
|
+
"npm-run-all2": "^9.0.0",
|
|
114
|
+
"prettier": "^3.7.4",
|
|
115
|
+
"pretty-quick": "^4.2.2",
|
|
116
|
+
"semantic-release": "^25.0.5",
|
|
117
|
+
"sort-package-json": "^4.0.0"
|
|
118
|
+
},
|
|
119
|
+
"peerDependencies": {
|
|
120
|
+
"eslint": "^9.0.0 || ^10.0.0",
|
|
121
|
+
"eslint-plugin-import-x": "^4.0.0",
|
|
122
|
+
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
123
|
+
"eslint-plugin-n": "^17.0.0 || ^18.0.0",
|
|
124
|
+
"eslint-plugin-no-unsanitized": "^4.0.0",
|
|
125
|
+
"eslint-plugin-optimize-regex": "^1.1.5",
|
|
126
|
+
"eslint-plugin-react": "^7.28.0",
|
|
127
|
+
"eslint-plugin-react-hooks": "^7.0.0",
|
|
128
|
+
"eslint-plugin-security": "^4.0.0"
|
|
131
129
|
}
|
|
132
130
|
}
|
package/react.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
'./rules/prettier',
|
|
6
|
-
].map(require.resolve);
|
|
1
|
+
import baseRules from './rules/base.js';
|
|
2
|
+
import reactRules from './rules/react.js';
|
|
3
|
+
import securityRules from './rules/security.js';
|
|
4
|
+
import prettierRules from './rules/prettier.js';
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
export default [
|
|
7
|
+
...baseRules,
|
|
8
|
+
...reactRules,
|
|
9
|
+
...securityRules,
|
|
10
|
+
...prettierRules,
|
|
11
|
+
];
|
package/rules/base.js
CHANGED
|
@@ -1,35 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
import js from '@eslint/js';
|
|
2
|
+
import pluginOptimizeRegex from 'eslint-plugin-optimize-regex';
|
|
3
|
+
import pluginImportX from 'eslint-plugin-import-x';
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
complexity: ['error', 6],
|
|
10
|
-
'import/extensions': [
|
|
11
|
-
'error',
|
|
12
|
-
'always',
|
|
13
|
-
{
|
|
14
|
-
js: 'never',
|
|
15
|
-
jsx: 'never',
|
|
16
|
-
mjs: 'never',
|
|
5
|
+
export default [
|
|
6
|
+
js.configs.recommended,
|
|
7
|
+
{
|
|
8
|
+
plugins: {
|
|
9
|
+
'optimize-regex': pluginOptimizeRegex,
|
|
10
|
+
'import-x': pluginImportX,
|
|
17
11
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
rules: {
|
|
13
|
+
'optimize-regex/optimize-regex': 'warn',
|
|
14
|
+
'no-param-reassign': ['error', { props: false }],
|
|
15
|
+
complexity: ['error', 6],
|
|
16
|
+
'import-x/extensions': ['error', 'always', { ignorePackages: true }],
|
|
17
|
+
},
|
|
18
|
+
settings: {
|
|
19
|
+
'import-x/resolver': {
|
|
20
|
+
node: {
|
|
21
|
+
extensions: ['.js', '.json', '.mjs'],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
'import-x/extensions': ['.js', '.jsx', '.mjs'],
|
|
25
25
|
},
|
|
26
26
|
},
|
|
27
|
-
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
module.exports = {
|
|
31
|
-
extends: extendedConfigs,
|
|
32
|
-
plugins,
|
|
33
|
-
rules,
|
|
34
|
-
settings,
|
|
35
|
-
};
|
|
27
|
+
];
|
package/rules/node.js
CHANGED
|
@@ -1,45 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
};
|
|
1
|
+
import pluginN from 'eslint-plugin-n';
|
|
2
|
+
import globals from 'globals';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
env,
|
|
42
|
-
globals,
|
|
43
|
-
plugins,
|
|
44
|
-
rules,
|
|
45
|
-
};
|
|
4
|
+
export default [
|
|
5
|
+
{
|
|
6
|
+
plugins: { n: pluginN },
|
|
7
|
+
languageOptions: {
|
|
8
|
+
ecmaVersion: 2022,
|
|
9
|
+
globals: {
|
|
10
|
+
...globals.node,
|
|
11
|
+
...globals.es2022,
|
|
12
|
+
Atomics: 'readonly',
|
|
13
|
+
SharedArrayBuffer: 'readonly',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
rules: {
|
|
17
|
+
'no-process-exit': 'error',
|
|
18
|
+
'n/exports-style': 'off',
|
|
19
|
+
'n/no-deprecated-api': 'error',
|
|
20
|
+
'n/no-extraneous-import': 'off',
|
|
21
|
+
'n/no-extraneous-require': 'error',
|
|
22
|
+
'n/no-missing-import': 'off',
|
|
23
|
+
'n/no-missing-require': 'error',
|
|
24
|
+
'n/no-unpublished-bin': 'error',
|
|
25
|
+
'n/no-unpublished-import': 'off',
|
|
26
|
+
'n/no-unpublished-require': 'error',
|
|
27
|
+
'n/no-unsupported-features/es-builtins': 'error',
|
|
28
|
+
'n/no-unsupported-features/es-syntax': 'error',
|
|
29
|
+
'n/no-unsupported-features/node-builtins': 'error',
|
|
30
|
+
'n/prefer-global/buffer': 'off',
|
|
31
|
+
'n/prefer-global/console': 'off',
|
|
32
|
+
'n/prefer-global/process': 'off',
|
|
33
|
+
'n/prefer-global/url-search-params': 'off',
|
|
34
|
+
'n/prefer-global/url': 'off',
|
|
35
|
+
'n/process-exit-as-throw': 'error',
|
|
36
|
+
'n/hashbang': 'error',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
];
|
package/rules/prettier.js
CHANGED
package/rules/react.js
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
import pluginReact from 'eslint-plugin-react';
|
|
2
|
+
import pluginReactHooks from 'eslint-plugin-react-hooks';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export default [
|
|
5
|
+
pluginReact.configs.flat.recommended,
|
|
6
|
+
{
|
|
7
|
+
plugins: {
|
|
8
|
+
'react-hooks': pluginReactHooks,
|
|
9
|
+
},
|
|
10
|
+
rules: {
|
|
11
|
+
'react-hooks/rules-of-hooks': 'error',
|
|
12
|
+
'react-hooks/exhaustive-deps': 'warn',
|
|
13
|
+
},
|
|
14
|
+
settings: {
|
|
15
|
+
'import-x/resolver': {
|
|
16
|
+
node: {
|
|
17
|
+
extensions: ['.js', '.jsx', '.json', '.mjs'],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
7
20
|
},
|
|
8
21
|
},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
module.exports = {
|
|
12
|
-
extends: extendedConfigs,
|
|
13
|
-
settings,
|
|
14
|
-
};
|
|
22
|
+
];
|
package/rules/security.js
CHANGED
|
@@ -1,72 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
1
|
+
import pluginSecurity from 'eslint-plugin-security';
|
|
2
|
+
import pluginNoUnsanitized from 'eslint-plugin-no-unsanitized';
|
|
3
|
+
import globals from 'globals';
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
'scanjs-rules/assign_to_location': 'warn',
|
|
35
|
-
'scanjs-rules/assign_to_onmessage': 'warn',
|
|
36
|
-
'scanjs-rules/assign_to_pathname': 'warn',
|
|
37
|
-
'scanjs-rules/assign_to_protocol': 'warn',
|
|
38
|
-
'scanjs-rules/assign_to_search': 'warn',
|
|
39
|
-
'scanjs-rules/assign_to_src': 'warn',
|
|
40
|
-
'scanjs-rules/call_Function': 'warn',
|
|
41
|
-
'scanjs-rules/call_addEventListener': 'warn',
|
|
42
|
-
'scanjs-rules/call_addEventListener_deviceproximity': 'warn',
|
|
43
|
-
'scanjs-rules/call_addEventListener_message': 'warn',
|
|
44
|
-
'scanjs-rules/call_connect': 'warn',
|
|
45
|
-
'scanjs-rules/call_eval': 'warn',
|
|
46
|
-
'scanjs-rules/call_execScript': 'warn',
|
|
47
|
-
'scanjs-rules/call_hide': 'warn',
|
|
48
|
-
'scanjs-rules/call_open_remote=true': 'warn',
|
|
49
|
-
'scanjs-rules/call_parseFromString': 'warn',
|
|
50
|
-
'scanjs-rules/call_setImmediate': 'warn',
|
|
51
|
-
'scanjs-rules/call_setInterval': 'warn',
|
|
52
|
-
'scanjs-rules/call_setTimeout': 'warn',
|
|
53
|
-
'scanjs-rules/identifier_indexedDB': 'warn',
|
|
54
|
-
'scanjs-rules/identifier_localStorage': 'warn',
|
|
55
|
-
'scanjs-rules/identifier_sessionStorage': 'warn',
|
|
56
|
-
'scanjs-rules/new_Function': 'warn',
|
|
57
|
-
'scanjs-rules/property_addIdleObserver': 'warn',
|
|
58
|
-
'scanjs-rules/property_createContextualFragment': 'warn',
|
|
59
|
-
'scanjs-rules/property_crypto': 'warn',
|
|
60
|
-
'scanjs-rules/property_geolocation': 'warn',
|
|
61
|
-
'scanjs-rules/property_getUserMedia': 'warn',
|
|
62
|
-
'scanjs-rules/property_indexedDB': 'warn',
|
|
63
|
-
'scanjs-rules/property_localStorage': 'warn',
|
|
64
|
-
'scanjs-rules/property_mgmt': 'warn',
|
|
65
|
-
'scanjs-rules/property_sessionStorage': 'warn',
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
module.exports = {
|
|
69
|
-
env,
|
|
70
|
-
plugins,
|
|
71
|
-
rules,
|
|
72
|
-
};
|
|
5
|
+
export default [
|
|
6
|
+
{
|
|
7
|
+
plugins: {
|
|
8
|
+
security: pluginSecurity,
|
|
9
|
+
'no-unsanitized': pluginNoUnsanitized,
|
|
10
|
+
},
|
|
11
|
+
languageOptions: {
|
|
12
|
+
globals: globals.browser,
|
|
13
|
+
},
|
|
14
|
+
rules: {
|
|
15
|
+
'security/detect-buffer-noassert': 'error',
|
|
16
|
+
'security/detect-child-process': 'error',
|
|
17
|
+
'security/detect-disable-mustache-escape': 'error',
|
|
18
|
+
'security/detect-eval-with-expression': 'error',
|
|
19
|
+
'security/detect-new-buffer': 'error',
|
|
20
|
+
'security/detect-no-csrf-before-method-override': 'error',
|
|
21
|
+
'security/detect-non-literal-fs-filename': 'error',
|
|
22
|
+
'security/detect-non-literal-regexp': 'error',
|
|
23
|
+
'security/detect-non-literal-require': 'error',
|
|
24
|
+
'security/detect-object-injection': 'error',
|
|
25
|
+
'security/detect-possible-timing-attacks': 'error',
|
|
26
|
+
'security/detect-pseudoRandomBytes': 'error',
|
|
27
|
+
'security/detect-unsafe-regex': 'error',
|
|
28
|
+
'no-unsanitized/method': 'error',
|
|
29
|
+
'no-unsanitized/property': 'error',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
];
|