@foray1010/eslint-config 15.1.0 → 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 +31 -0
- package/bases/base.mjs +5 -14
- package/bases/browser.mjs +1 -1
- package/bases/ignores.mjs +1 -1
- package/bases/node.mjs +3 -3
- package/bases/prettier.mjs +1 -1
- package/bases/react.mjs +2 -4
- package/index.mjs +1 -1
- package/package.json +24 -27
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,37 @@
|
|
|
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
|
+
|
|
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)
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
- **deps:** update dependency eslint-plugin-react-compiler to rc2 ([c2b0651](https://github.com/foray1010/common-presets/commit/c2b06518fde68831f0c2e2606a0734c7ad28def1))
|
|
34
|
+
- **deps:** update dependency eslint-plugin-unicorn to v59 ([70a56b1](https://github.com/foray1010/common-presets/commit/70a56b192a84a4d5b5690404059d18d4ded28a37))
|
|
35
|
+
- **deps:** update dependency eslint-plugin-unicorn to v60 ([5d2c0b1](https://github.com/foray1010/common-presets/commit/5d2c0b1f03c8535cf284e9de4d60b0e9619903b2))
|
|
36
|
+
|
|
6
37
|
## [15.1.0](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@15.0.1...@foray1010/eslint-config@15.1.0) (2025-03-26)
|
|
7
38
|
|
|
8
39
|
### Features
|
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, import-x/no-unresolved
|
|
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,18 +19,15 @@ 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
|
-
// eslint-disable-next-line import-x/no-unresolved
|
|
25
24
|
const tseslint = (await import('typescript-eslint')).default
|
|
26
25
|
|
|
27
26
|
return defineConfig(
|
|
28
27
|
{
|
|
29
28
|
files: typeScriptFileGlobs,
|
|
30
29
|
extends: [
|
|
31
|
-
// @ts-expect-error tseslint interface does not align with eslint
|
|
32
30
|
tseslint.configs.eslintRecommended,
|
|
33
|
-
// @ts-expect-error tseslint interface does not align with eslint
|
|
34
31
|
tseslint.configs.recommendedTypeChecked,
|
|
35
32
|
eslintPluginImportX.configs['typescript'],
|
|
36
33
|
esmConfig,
|
|
@@ -176,10 +173,7 @@ const esmConfig = defineConfig({
|
|
|
176
173
|
const baseConfig = defineConfig(
|
|
177
174
|
js.configs.recommended,
|
|
178
175
|
{
|
|
179
|
-
extends: [
|
|
180
|
-
// @ts-expect-error no official types
|
|
181
|
-
eslintPluginEslintCommentsConfigs['recommended'],
|
|
182
|
-
],
|
|
176
|
+
extends: [eslintPluginEslintCommentsConfigs['recommended']],
|
|
183
177
|
rules: {
|
|
184
178
|
// allow disable eslint rules for whole file without re-enable it in the end of the file
|
|
185
179
|
'@eslint-community/eslint-comments/disable-enable-pair': [
|
|
@@ -191,10 +185,7 @@ const baseConfig = defineConfig(
|
|
|
191
185
|
},
|
|
192
186
|
},
|
|
193
187
|
{
|
|
194
|
-
extends: [
|
|
195
|
-
// @ts-expect-error eslint-plugin-import-x interface does not align with eslint
|
|
196
|
-
eslintPluginImportX.flatConfigs.recommended,
|
|
197
|
-
],
|
|
188
|
+
extends: [eslintPluginImportX.flatConfigs.recommended],
|
|
198
189
|
rules: {
|
|
199
190
|
// this rule doesn't support commonjs, some dependencies are using commonjs
|
|
200
191
|
'import-x/default': 'off',
|
package/bases/browser.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { hasDep } from '@foray1010/common-presets-utils'
|
|
2
2
|
import restrictedGlobals from 'confusing-browser-globals'
|
|
3
|
-
// eslint-disable-next-line import-x/extensions
|
|
3
|
+
// eslint-disable-next-line import-x/extensions
|
|
4
4
|
import { defineConfig } from 'eslint/config'
|
|
5
5
|
import eslintPluginCompat from 'eslint-plugin-compat'
|
|
6
6
|
import eslintPluginTestingLibrary from 'eslint-plugin-testing-library'
|
package/bases/ignores.mjs
CHANGED
package/bases/node.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isESM } from '@foray1010/common-presets-utils'
|
|
2
|
-
// eslint-disable-next-line import-x/extensions
|
|
2
|
+
// eslint-disable-next-line import-x/extensions
|
|
3
3
|
import { defineConfig } from 'eslint/config'
|
|
4
4
|
import eslintPluginN from 'eslint-plugin-n'
|
|
5
5
|
|
|
@@ -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/prettier.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// eslint-disable-next-line import-x/extensions
|
|
1
|
+
// eslint-disable-next-line import-x/extensions
|
|
2
2
|
import { defineConfig } from 'eslint/config'
|
|
3
3
|
// eslint-disable-next-line import-x/extensions
|
|
4
4
|
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
|
package/bases/react.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
// eslint-disable-next-line import-x/extensions
|
|
1
|
+
// eslint-disable-next-line import-x/extensions
|
|
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/index.mjs
CHANGED
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
|
}
|