@mi11er/eslint-config 2.4.0 → 3.0.3
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 +64 -61
- 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.3](https://github.com/mi11er-net/eslint-config/compare/v3.0.2...v3.0.3) (2026-06-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **ci:** remove --provenance flag; npm provenance does not support CircleCI ([197abe4](https://github.com/mi11er-net/eslint-config/commit/197abe41beb7b750a048de0adde11209e2eda5d2))
|
|
7
|
+
|
|
8
|
+
## [3.0.2](https://github.com/mi11er-net/eslint-config/compare/v3.0.1...v3.0.2) (2026-06-14)
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
- **ci:** force 3.0.2 release after failed 3.0.1 publish attempts ([ec26627](https://github.com/mi11er-net/eslint-config/commit/ec2662784da949b81a91fef38a680bc9d2735327))
|
|
13
|
+
|
|
14
|
+
## [3.0.1](https://github.com/mi11er-net/eslint-config/compare/v3.0.0...v3.0.1) (2026-06-14)
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
- **ci:** use ./release path prefix for npm publish to avoid GitHub shorthand interpretation ([a7ffbd3](https://github.com/mi11er-net/eslint-config/commit/a7ffbd357a231774586ad9cabf67a71473435e16))
|
|
19
|
+
|
|
20
|
+
# [3.0.0](https://github.com/mi11er-net/eslint-config/compare/v2.4.1...v3.0.0) (2026-06-14)
|
|
21
|
+
|
|
22
|
+
- 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)
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
- **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)
|
|
27
|
+
- **ci:** mkdir -p release before npm pack (directory is gitignored) ([eafe689](https://github.com/mi11er-net/eslint-config/commit/eafe689df9fdf37c0a8d3657cbde41063729cf83))
|
|
28
|
+
- **ci:** switch npm publish to OIDC trusted publishing ([748b0e4](https://github.com/mi11er-net/eslint-config/commit/748b0e4b2a7c85ac70ac94033781fd973e5505cd))
|
|
29
|
+
- **ci:** upgrade semantic-release stack and pin Node for OIDC support ([96c400c](https://github.com/mi11er-net/eslint-config/commit/96c400cde5dd6108b28dc69046f1e3df30a91764))
|
|
30
|
+
- **deps:** update dependency eslint-config-airbnb to v17.1.1 ([4730d2e](https://github.com/mi11er-net/eslint-config/commit/4730d2e43991d79b27384f8a584d232127251d9c))
|
|
31
|
+
- **deps:** update dependency eslint-config-airbnb-base to v13.2.0 ([095f13e](https://github.com/mi11er-net/eslint-config/commit/095f13ec02273a85db1b945bef3661741c362851))
|
|
32
|
+
- **deps:** update dependency eslint-config-prettier to v4.3.0 ([e8b6f3a](https://github.com/mi11er-net/eslint-config/commit/e8b6f3af995970d1353b5334d09caa9832dcd68a))
|
|
33
|
+
- **deps:** update eslint monorepo to v10 ([d49bd98](https://github.com/mi11er-net/eslint-config/commit/d49bd98fa70b170bca9079a176ea3bd189b1efb9))
|
|
34
|
+
|
|
35
|
+
### Features
|
|
36
|
+
|
|
37
|
+
- 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)
|
|
38
|
+
- 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)
|
|
39
|
+
|
|
40
|
+
### BREAKING CHANGES
|
|
41
|
+
|
|
42
|
+
- Package now requires flat config (no eslintrc support).
|
|
43
|
+
Consumers must use eslint.config.js (or .mjs) with ESM import syntax.
|
|
44
|
+
ESLint 8 is no longer supported. Peer dep changes:
|
|
45
|
+
|
|
46
|
+
* eslint ^9.0.0 || ^10.0.0 (was ^8.23.0 || ^9.0.0 || ^10.0.0)
|
|
47
|
+
* eslint-plugin-import-x ^4.0.0 (replaces eslint-plugin-import)
|
|
48
|
+
* eslint-plugin-react-hooks ^7.0.0 (was ^4.3.0)
|
|
49
|
+
* eslint-plugin-scanjs-rules removed (unmaintained, no flat config support)
|
|
50
|
+
|
|
51
|
+
## [2.4.1](https://github.com/mi11er-net/eslint-config/compare/v2.4.0...v2.4.1) (2019-04-01)
|
|
52
|
+
|
|
53
|
+
### Bug Fixes
|
|
54
|
+
|
|
55
|
+
- **deps:** update eslint ([0828ddb](https://github.com/mi11er-net/eslint-config/commit/0828ddb))
|
|
56
|
+
|
|
1
57
|
# [2.4.0](https://github.com/mi11er-net/eslint-config/compare/v2.3.0...v2.4.0) (2018-07-31)
|
|
2
58
|
|
|
3
59
|
### Features
|
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.3",
|
|
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,74 +31,23 @@
|
|
|
26
31
|
"react.js",
|
|
27
32
|
"rules"
|
|
28
33
|
],
|
|
29
|
-
"main": "index.js",
|
|
30
34
|
"scripts": {
|
|
31
|
-
"audit": "
|
|
32
|
-
"precommit": "run-s lint-staged pretty-quick audit",
|
|
35
|
+
"audit": "node scripts/audit.cjs",
|
|
33
36
|
"lint": "eslint --fix .",
|
|
34
37
|
"lint-staged": "lint-staged",
|
|
35
|
-
"
|
|
36
|
-
"pretty-quick": "pretty-quick --staged"
|
|
37
|
-
|
|
38
|
-
"config": {
|
|
39
|
-
"commitizen": {
|
|
40
|
-
"path": "./node_modules/cz-conventional-changelog"
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"dependencies": {
|
|
44
|
-
"eslint-config-airbnb": "17.0.0",
|
|
45
|
-
"eslint-config-airbnb-base": "13.0.0",
|
|
46
|
-
"eslint-config-prettier": "2.9.0"
|
|
47
|
-
},
|
|
48
|
-
"devDependencies": {
|
|
49
|
-
"@capaj/npm-audit-ci": "1.0.5",
|
|
50
|
-
"@semantic-release/changelog": "3.0.0",
|
|
51
|
-
"@semantic-release/exec": "2.3.0",
|
|
52
|
-
"@semantic-release/git": "7.0.1",
|
|
53
|
-
"commitizen": "2.10.1",
|
|
54
|
-
"cz-conventional-changelog": "2.1.0",
|
|
55
|
-
"eslint": "5.2.0",
|
|
56
|
-
"eslint-index": "1.5.0",
|
|
57
|
-
"eslint-plugin-import": "2.13.0",
|
|
58
|
-
"eslint-plugin-jsx-a11y": "6.1.1",
|
|
59
|
-
"eslint-plugin-no-unsafe-innerhtml": "1.0.16",
|
|
60
|
-
"eslint-plugin-node": "7.0.1",
|
|
61
|
-
"eslint-plugin-optimize-regex": "1.1.5",
|
|
62
|
-
"eslint-plugin-react": "7.10.0",
|
|
63
|
-
"eslint-plugin-scanjs-rules": "0.2.1",
|
|
64
|
-
"eslint-plugin-security": "1.4.0",
|
|
65
|
-
"husky": "0.14.3",
|
|
66
|
-
"lint-staged": "7.2.0",
|
|
67
|
-
"npm-run-all": "4.1.3",
|
|
68
|
-
"prettier": "1.14.0",
|
|
69
|
-
"pretty-quick": "1.6.0",
|
|
70
|
-
"semantic-release": "15.9.2",
|
|
71
|
-
"sort-package-json": "1.15.0"
|
|
72
|
-
},
|
|
73
|
-
"peerDependencies": {
|
|
74
|
-
"eslint": "^4.19.1 || ^5.0.0",
|
|
75
|
-
"eslint-plugin-import": "^2.10.0",
|
|
76
|
-
"eslint-plugin-jsx-a11y": "^6.0.3",
|
|
77
|
-
"eslint-plugin-no-unsafe-innerhtml": "^1.0.16",
|
|
78
|
-
"eslint-plugin-node": "^6.0.1 || ^7.0.0",
|
|
79
|
-
"eslint-plugin-optimize-regex": "^1.1.5",
|
|
80
|
-
"eslint-plugin-react": "^7.7.0",
|
|
81
|
-
"eslint-plugin-scanjs-rules": "^0.2.1",
|
|
82
|
-
"eslint-plugin-security": "^1.4.0"
|
|
38
|
+
"prepare": "husky",
|
|
39
|
+
"pretty-quick": "pretty-quick --staged",
|
|
40
|
+
"test": "run-s lint audit"
|
|
83
41
|
},
|
|
84
42
|
"release": {
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
"@semantic-release/changelog",
|
|
88
|
-
"@semantic-release/npm",
|
|
89
|
-
"@semantic-release/git",
|
|
90
|
-
"@semantic-release/github"
|
|
43
|
+
"branches": [
|
|
44
|
+
"master"
|
|
91
45
|
],
|
|
92
46
|
"prepare": [
|
|
93
47
|
"@semantic-release/changelog",
|
|
94
48
|
{
|
|
95
|
-
"path": "@semantic-release/
|
|
96
|
-
"
|
|
49
|
+
"path": "@semantic-release/exec",
|
|
50
|
+
"cmd": "npm --no-git-tag-version version ${nextRelease.version} && mkdir -p release && npm pack --pack-destination release"
|
|
97
51
|
},
|
|
98
52
|
{
|
|
99
53
|
"path": "@semantic-release/exec",
|
|
@@ -113,7 +67,10 @@
|
|
|
113
67
|
}
|
|
114
68
|
],
|
|
115
69
|
"publish": [
|
|
116
|
-
|
|
70
|
+
{
|
|
71
|
+
"path": "@semantic-release/exec",
|
|
72
|
+
"cmd": "npm publish ./release/*.tgz"
|
|
73
|
+
},
|
|
117
74
|
{
|
|
118
75
|
"path": "@semantic-release/github",
|
|
119
76
|
"assets": [
|
|
@@ -123,6 +80,52 @@
|
|
|
123
80
|
}
|
|
124
81
|
]
|
|
125
82
|
}
|
|
83
|
+
],
|
|
84
|
+
"verifyConditions": [
|
|
85
|
+
"@semantic-release/changelog",
|
|
86
|
+
"@semantic-release/git",
|
|
87
|
+
"@semantic-release/github"
|
|
126
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-index": "1.5.0",
|
|
104
|
+
"eslint-plugin-import-x": "^4.16.2",
|
|
105
|
+
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
106
|
+
"eslint-plugin-n": "^18.0.0",
|
|
107
|
+
"eslint-plugin-no-unsanitized": "^4.1.4",
|
|
108
|
+
"eslint-plugin-optimize-regex": "1.2.1",
|
|
109
|
+
"eslint-plugin-react": "7.37.5",
|
|
110
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
111
|
+
"eslint-plugin-security": "^4.0.0",
|
|
112
|
+
"husky": "^9.1.7",
|
|
113
|
+
"lint-staged": "^17.0.0",
|
|
114
|
+
"npm-run-all2": "^9.0.0",
|
|
115
|
+
"prettier": "^3.7.4",
|
|
116
|
+
"pretty-quick": "^4.2.2",
|
|
117
|
+
"semantic-release": "^25.0.5",
|
|
118
|
+
"sort-package-json": "^4.0.0"
|
|
119
|
+
},
|
|
120
|
+
"peerDependencies": {
|
|
121
|
+
"eslint": "^9.0.0 || ^10.0.0",
|
|
122
|
+
"eslint-plugin-import-x": "^4.0.0",
|
|
123
|
+
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
124
|
+
"eslint-plugin-n": "^17.0.0 || ^18.0.0",
|
|
125
|
+
"eslint-plugin-no-unsanitized": "^4.0.0",
|
|
126
|
+
"eslint-plugin-optimize-regex": "^1.1.5",
|
|
127
|
+
"eslint-plugin-react": "^7.28.0",
|
|
128
|
+
"eslint-plugin-react-hooks": "^7.0.0",
|
|
129
|
+
"eslint-plugin-security": "^4.0.0"
|
|
127
130
|
}
|
|
128
131
|
}
|
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
|
+
];
|