@foray1010/eslint-config 15.1.1 → 16.0.0
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 +23 -0
- package/bases/base.mjs +5 -13
- package/bases/node.mjs +2 -2
- package/bases/react.mjs +1 -3
- package/package.json +24 -27
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,29 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [16.0.0](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@15.1.1...@foray1010/eslint-config@16.0.0) (2025-10-31)
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
- **deps:** bump peer dependencies to current version
|
|
11
|
+
- require nodejs `^20.19.0 || ^22.12.0 || >=24.11.0`
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
- **deps:** update dependency eslint-plugin-jest to v29 ([b1e544f](https://github.com/foray1010/common-presets/commit/b1e544ff950867c82fae3cb3478a973ce885d841))
|
|
16
|
+
- **deps:** update dependency eslint-plugin-react-hooks to v7 ([3834ca1](https://github.com/foray1010/common-presets/commit/3834ca19afa9749997449ee68e9daf809c93a584))
|
|
17
|
+
- **deps:** update dependency eslint-plugin-unicorn to v61 ([06ed9c2](https://github.com/foray1010/common-presets/commit/06ed9c279e567e15b124fb580b7a1b0b66f0cf94))
|
|
18
|
+
- **deps:** update dependency eslint-plugin-unicorn to v62 ([4db59b4](https://github.com/foray1010/common-presets/commit/4db59b4f64a0cb406614a48cc6375dd63f2074d9))
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
- **eslint-config:** replace deprecated n/shebang with n/hashbang ([8c4d272](https://github.com/foray1010/common-presets/commit/8c4d2721a51de610cb1a0b1b10eaf4946f3fb530))
|
|
23
|
+
|
|
24
|
+
### Miscellaneous Chores
|
|
25
|
+
|
|
26
|
+
- **deps:** bump peer dependencies to current version ([a47bc48](https://github.com/foray1010/common-presets/commit/a47bc48f7db8f4a527163ab35448f4eba455496f))
|
|
27
|
+
- require nodejs `^20.19.0 || ^22.12.0 || >=24.11.0` ([aae1835](https://github.com/foray1010/common-presets/commit/aae1835f9517621ddc0d71f31bda39e9163213a1))
|
|
28
|
+
|
|
6
29
|
## [15.1.1](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@15.1.0...@foray1010/eslint-config@15.1.1) (2025-08-03)
|
|
7
30
|
|
|
8
31
|
### Bug Fixes
|
package/bases/base.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
/* eslint-disable import-x/extensions */
|
|
1
2
|
import js from '@eslint/js'
|
|
2
|
-
//
|
|
3
|
+
// @ts-expect-error - no official types
|
|
3
4
|
import eslintPluginEslintCommentsConfigs from '@eslint-community/eslint-plugin-eslint-comments/configs'
|
|
4
5
|
import { hasDep, isESM } from '@foray1010/common-presets-utils'
|
|
5
|
-
// eslint-disable-next-line import-x/extensions
|
|
6
6
|
import { defineConfig } from 'eslint/config'
|
|
7
7
|
import eslintPluginImportX from 'eslint-plugin-import-x'
|
|
8
8
|
import eslintPluginJest from 'eslint-plugin-jest'
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
|
|
20
20
|
async function generateTypeScriptConfig() {
|
|
21
21
|
// typescript plugins are depended on `typescript` package
|
|
22
|
-
if (!hasDep('typescript')) return
|
|
22
|
+
if (!hasDep('typescript')) return []
|
|
23
23
|
|
|
24
24
|
const tseslint = (await import('typescript-eslint')).default
|
|
25
25
|
|
|
@@ -27,9 +27,7 @@ async function generateTypeScriptConfig() {
|
|
|
27
27
|
{
|
|
28
28
|
files: typeScriptFileGlobs,
|
|
29
29
|
extends: [
|
|
30
|
-
// @ts-expect-error tseslint interface does not align with eslint
|
|
31
30
|
tseslint.configs.eslintRecommended,
|
|
32
|
-
// @ts-expect-error tseslint interface does not align with eslint
|
|
33
31
|
tseslint.configs.recommendedTypeChecked,
|
|
34
32
|
eslintPluginImportX.configs['typescript'],
|
|
35
33
|
esmConfig,
|
|
@@ -175,10 +173,7 @@ const esmConfig = defineConfig({
|
|
|
175
173
|
const baseConfig = defineConfig(
|
|
176
174
|
js.configs.recommended,
|
|
177
175
|
{
|
|
178
|
-
extends: [
|
|
179
|
-
// @ts-expect-error no official types
|
|
180
|
-
eslintPluginEslintCommentsConfigs['recommended'],
|
|
181
|
-
],
|
|
176
|
+
extends: [eslintPluginEslintCommentsConfigs['recommended']],
|
|
182
177
|
rules: {
|
|
183
178
|
// allow disable eslint rules for whole file without re-enable it in the end of the file
|
|
184
179
|
'@eslint-community/eslint-comments/disable-enable-pair': [
|
|
@@ -190,10 +185,7 @@ const baseConfig = defineConfig(
|
|
|
190
185
|
},
|
|
191
186
|
},
|
|
192
187
|
{
|
|
193
|
-
extends: [
|
|
194
|
-
// @ts-expect-error eslint-plugin-import-x interface does not align with eslint
|
|
195
|
-
eslintPluginImportX.flatConfigs.recommended,
|
|
196
|
-
],
|
|
188
|
+
extends: [eslintPluginImportX.flatConfigs.recommended],
|
|
197
189
|
rules: {
|
|
198
190
|
// this rule doesn't support commonjs, some dependencies are using commonjs
|
|
199
191
|
'import-x/default': 'off',
|
package/bases/node.mjs
CHANGED
|
@@ -26,6 +26,8 @@ const nodeConfig = defineConfig(
|
|
|
26
26
|
},
|
|
27
27
|
},
|
|
28
28
|
rules: {
|
|
29
|
+
// enforce shebang on the entry bin file
|
|
30
|
+
'n/hashbang': 'error',
|
|
29
31
|
// disallow deprecated node APIs
|
|
30
32
|
'n/no-deprecated-api': 'error',
|
|
31
33
|
// disallow the assignment to `exports`
|
|
@@ -56,8 +58,6 @@ const nodeConfig = defineConfig(
|
|
|
56
58
|
'n/prefer-promises/fs': 'error',
|
|
57
59
|
// make `process.exit()` expressions the same code path as `throw`
|
|
58
60
|
'n/process-exit-as-throw': 'error',
|
|
59
|
-
// enforce shebang on the entry bin file
|
|
60
|
-
'n/shebang': 'error',
|
|
61
61
|
},
|
|
62
62
|
},
|
|
63
63
|
...(isESM()
|
package/bases/react.mjs
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { defineConfig } from 'eslint/config'
|
|
3
3
|
import eslintPluginJsxA11y from 'eslint-plugin-jsx-a11y'
|
|
4
4
|
import eslintPluginReact from 'eslint-plugin-react'
|
|
5
|
-
import eslintPluginReactCompiler from 'eslint-plugin-react-compiler'
|
|
6
5
|
import eslintPluginReactHooks from 'eslint-plugin-react-hooks'
|
|
7
6
|
import eslintPluginTestingLibrary from 'eslint-plugin-testing-library'
|
|
8
7
|
|
|
@@ -16,9 +15,8 @@ const reactConfig = defineConfig(
|
|
|
16
15
|
},
|
|
17
16
|
},
|
|
18
17
|
extends: [
|
|
19
|
-
eslintPluginReact.configs.flat
|
|
18
|
+
eslintPluginReact.configs.flat['recommended'],
|
|
20
19
|
eslintPluginReact.configs.flat['jsx-runtime'],
|
|
21
|
-
eslintPluginReactCompiler.configs.recommended,
|
|
22
20
|
eslintPluginReactHooks.configs['recommended-latest'],
|
|
23
21
|
eslintPluginJsxA11y.flatConfigs.recommended,
|
|
24
22
|
],
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package",
|
|
3
3
|
"name": "@foray1010/eslint-config",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "16.0.0",
|
|
5
5
|
"homepage": "https://github.com/foray1010/common-presets/tree/master/packages/eslint-config#readme",
|
|
6
6
|
"bugs": "https://github.com/foray1010/common-presets/issues",
|
|
7
7
|
"repository": {
|
|
@@ -20,39 +20,36 @@
|
|
|
20
20
|
"type:check": "tsc"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@eslint-community/eslint-plugin-eslint-comments": "^4.
|
|
24
|
-
"@eslint/js": "^9.
|
|
25
|
-
"@foray1010/common-presets-utils": "^
|
|
23
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
24
|
+
"@eslint/js": "^9.38.0",
|
|
25
|
+
"@foray1010/common-presets-utils": "^9.0.0",
|
|
26
26
|
"confusing-browser-globals": "^1.0.11",
|
|
27
|
-
"eslint-config-prettier": "^10.
|
|
28
|
-
"eslint-import-resolver-typescript": "^4.
|
|
27
|
+
"eslint-config-prettier": "^10.1.8",
|
|
28
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
29
29
|
"eslint-plugin-compat": "^6.0.2",
|
|
30
|
-
"eslint-plugin-import-x": "^4.
|
|
31
|
-
"eslint-plugin-jest": "^
|
|
30
|
+
"eslint-plugin-import-x": "^4.16.1",
|
|
31
|
+
"eslint-plugin-jest": "^29.0.1",
|
|
32
32
|
"eslint-plugin-jest-dom": "^5.5.0",
|
|
33
33
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
34
|
-
"eslint-plugin-n": "^17.
|
|
35
|
-
"eslint-plugin-prettier": "^5.
|
|
36
|
-
"eslint-plugin-react": "^7.37.
|
|
37
|
-
"eslint-plugin-react-
|
|
38
|
-
"eslint-plugin-
|
|
39
|
-
"eslint-plugin-regexp": "^2.7.0",
|
|
34
|
+
"eslint-plugin-n": "^17.23.1",
|
|
35
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
36
|
+
"eslint-plugin-react": "^7.37.5",
|
|
37
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
38
|
+
"eslint-plugin-regexp": "^2.10.0",
|
|
40
39
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
41
|
-
"eslint-plugin-testing-library": "^7.
|
|
42
|
-
"eslint-plugin-unicorn": "^
|
|
43
|
-
"globals": "^16.
|
|
44
|
-
"typescript-eslint": "^8.
|
|
40
|
+
"eslint-plugin-testing-library": "^7.13.3",
|
|
41
|
+
"eslint-plugin-unicorn": "^62.0.0",
|
|
42
|
+
"globals": "^16.4.0",
|
|
43
|
+
"typescript-eslint": "^8.46.2"
|
|
45
44
|
},
|
|
46
45
|
"devDependencies": {
|
|
47
|
-
"@types/confusing-browser-globals": "1.0.3"
|
|
48
|
-
"@types/eslint": "9.6.1",
|
|
49
|
-
"@types/eslint-plugin-jsx-a11y": "6.10.0"
|
|
46
|
+
"@types/confusing-browser-globals": "1.0.3"
|
|
50
47
|
},
|
|
51
48
|
"peerDependencies": {
|
|
52
|
-
"@testing-library/dom": "^10.
|
|
53
|
-
"eslint": "^9.
|
|
54
|
-
"prettier": "^3.
|
|
55
|
-
"typescript": "^5.
|
|
49
|
+
"@testing-library/dom": "^10.4.1",
|
|
50
|
+
"eslint": "^9.38.0",
|
|
51
|
+
"prettier": "^3.6.2",
|
|
52
|
+
"typescript": "^5.9.3"
|
|
56
53
|
},
|
|
57
54
|
"peerDependenciesMeta": {
|
|
58
55
|
"@testing-library/dom": {
|
|
@@ -63,10 +60,10 @@
|
|
|
63
60
|
}
|
|
64
61
|
},
|
|
65
62
|
"engines": {
|
|
66
|
-
"node": "^20.
|
|
63
|
+
"node": "^20.19.0 || ^22.12.0 || >=24.11.0"
|
|
67
64
|
},
|
|
68
65
|
"publishConfig": {
|
|
69
66
|
"access": "public"
|
|
70
67
|
},
|
|
71
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "f4d31b1d0075b0c77a6ae59e7442a977df4b4d15"
|
|
72
69
|
}
|