eslint-config-fabulator 5.3.1 → 6.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 +84 -0
- package/index.js +88 -62
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,90 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
|
|
4
|
+
## v6.0.0 (2026-11-24)
|
|
5
|
+
### Changed
|
|
6
|
+
- [453404c](https://github.com/fabulator/eslint-config-fabulator/commit/453404c29713bcdb41ea5cc4359ec5946f6363d4) Upgrade to ESLint 10 and strictest presets BREAKING (#244)
|
|
7
|
+
|
|
8
|
+
* Docs: Add CLAUDE.md with repository overview
|
|
9
|
+
|
|
10
|
+
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
11
|
+
|
|
12
|
+
* Changed: Upgrade to ESLint 10 and strictest presets BREAKING
|
|
13
|
+
|
|
14
|
+
- eslint and @eslint/js 10, peer dependency eslint ^10
|
|
15
|
+
- eslint-plugin-import -> eslint-plugin-import-x (rules import/* -> import-x/*)
|
|
16
|
+
- eslint-plugin-react -> @eslint-react/eslint-plugin strict / strict-type-checked (rules react/* -> @eslint-react/*)
|
|
17
|
+
- eslint-plugin-jsx-a11y -> eslint-plugin-jsx-a11y-x strict (rules jsx-a11y/* -> jsx-a11y-x/*)
|
|
18
|
+
- remove unused eslint-plugin-canonical
|
|
19
|
+
- array-func uses the "all" preset
|
|
20
|
+
- all warnings from presets are reported as errors
|
|
21
|
+
- import-x/no-unused-modules removed (no-op on ESLint 10)
|
|
22
|
+
- typescript 6.0, peer dependency typescript ^5 || ~6.0
|
|
23
|
+
- update remaining dependencies to latest versions
|
|
24
|
+
|
|
25
|
+
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
26
|
+
|
|
27
|
+
---------
|
|
28
|
+
|
|
29
|
+
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
|
30
|
+
- [4da21cf](https://github.com/fabulator/eslint-config-fabulator/commit/4da21cfa926b20df37cc6d1daffb4827364e6551) Update Github Flow dependency node to v24.14.1 (#227)
|
|
31
|
+
|
|
32
|
+
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
33
|
+
- [7bce9cb](https://github.com/fabulator/eslint-config-fabulator/commit/7bce9cb20cbee9ecbd1d70fd88b3279bfa90a79b) Update Github Flow dependency node to v24.14.0 (#225)
|
|
34
|
+
|
|
35
|
+
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
36
|
+
- [02781a5](https://github.com/fabulator/eslint-config-fabulator/commit/02781a5645d9da2d08890c6cd4c9aaff7d1c3a92) Update Github Flow dependency node to v24.13.1 (#224)
|
|
37
|
+
|
|
38
|
+
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
39
|
+
- [7ff4594](https://github.com/fabulator/eslint-config-fabulator/commit/7ff4594e7e041bd64730546065e28159000fe61a) Update Github Flow dependency node to v24.13.0 (#222)
|
|
40
|
+
|
|
41
|
+
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
42
|
+
- [2f4b1ce](https://github.com/fabulator/eslint-config-fabulator/commit/2f4b1ced97fcae3769fb9fdbe07a1bf7a4457d13) Update Github Flow dependency node to v24.12.0 (#220)
|
|
43
|
+
|
|
44
|
+
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
45
|
+
- [84618e4](https://github.com/fabulator/eslint-config-fabulator/commit/84618e44eceabb49af609f90380866b969b4d120) Update Github Flow dependency node to v24.11.1 (#216)
|
|
46
|
+
|
|
47
|
+
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
48
|
+
|
|
49
|
+
### chore(deps)
|
|
50
|
+
- [28c1845](https://github.com/fabulator/eslint-config-fabulator/commit/28c18459063d013cce8d94779a67469d67035f16) changed: update github flow no_release dependency node to v24.22.3 (#243)
|
|
51
|
+
|
|
52
|
+
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
53
|
+
- [31c41f8](https://github.com/fabulator/eslint-config-fabulator/commit/31c41f8e8a103fdb0c82830167d3047c9a815012) changed: update github flow no_release dependency node to v24.22.1 (#241)
|
|
54
|
+
|
|
55
|
+
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
56
|
+
- [bd60a41](https://github.com/fabulator/eslint-config-fabulator/commit/bd60a41f2b188e829f5223371b01154b0a7c4c86) changed: update github flow no_release dependency node to v24.22.0 (#240)
|
|
57
|
+
|
|
58
|
+
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
59
|
+
- [3e8a6cb](https://github.com/fabulator/eslint-config-fabulator/commit/3e8a6cb319d8c1ac9d9ac7af90de76d8fe3797af) changed: update github flow no_release dependency node to v24.21.0 (#239)
|
|
60
|
+
|
|
61
|
+
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
62
|
+
- [b10ada7](https://github.com/fabulator/eslint-config-fabulator/commit/b10ada7c72252df15629e6c797ee24a34d4bb9dc) changed: update github flow no_release dependency node to v24.20.0 (#238)
|
|
63
|
+
|
|
64
|
+
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
65
|
+
- [fbad67f](https://github.com/fabulator/eslint-config-fabulator/commit/fbad67f5729d7974ae600b54cb480e17859408f7) changed: update github flow no_release dependency node to v24.19.0 (#237)
|
|
66
|
+
|
|
67
|
+
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
68
|
+
- [ebb9d98](https://github.com/fabulator/eslint-config-fabulator/commit/ebb9d984186733e8259d09d215760135e1e01ec1) changed: update github flow no_release dependency node to v24.18.1 (#236)
|
|
69
|
+
|
|
70
|
+
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
71
|
+
- [46fe6f7](https://github.com/fabulator/eslint-config-fabulator/commit/46fe6f7a1d50ded9f8ef269713e85ddb4d3cea2a) changed: update github flow no_release dependency node to v24.18.0 (#233)
|
|
72
|
+
|
|
73
|
+
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
74
|
+
- [7dcab4b](https://github.com/fabulator/eslint-config-fabulator/commit/7dcab4bbbb86c1ca9a6c6f7c6a2d3e25b9c28c77) changed: update github flow no_release dependency node to v24.17.0 (#232)
|
|
75
|
+
|
|
76
|
+
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
77
|
+
- [176c7f9](https://github.com/fabulator/eslint-config-fabulator/commit/176c7f92295b1aea7f3d4782f74601a333c35eff) changed: update github flow no_release dependency node to v24.16.0 (#230)
|
|
78
|
+
|
|
79
|
+
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
80
|
+
- [b23ae33](https://github.com/fabulator/eslint-config-fabulator/commit/b23ae336d2b29aae0254d731bf00f3a6a011e48c) changed: update github flow no_release dependency node to v24.15.0 (#228)
|
|
81
|
+
|
|
82
|
+
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
83
|
+
|
|
84
|
+
## v5.3.2 (2025-10-31)
|
|
85
|
+
### Fixed
|
|
86
|
+
- [60b3217](https://github.com/fabulator/eslint-config-fabulator/commit/60b3217ce493c215bed58032fcc8a255e991cd17) Definition for react hook config
|
|
87
|
+
|
|
4
88
|
## v5.3.1 (2025-10-31)
|
|
5
89
|
### Fixed
|
|
6
90
|
- [b3fd9ad](https://github.com/fabulator/eslint-config-fabulator/commit/b3fd9ad4b7a8429cdd727a9a04b5fd4655d63fc7) Extension glob for typescript files
|
package/index.js
CHANGED
|
@@ -1,21 +1,52 @@
|
|
|
1
|
-
import
|
|
2
|
-
import reactPlugin from 'eslint-plugin-react';
|
|
3
|
-
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
|
4
|
-
import arrayFunc from 'eslint-plugin-array-func';
|
|
1
|
+
import eslintReact from '@eslint-react/eslint-plugin';
|
|
5
2
|
import js from '@eslint/js';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
3
|
+
import vitest from '@vitest/eslint-plugin';
|
|
4
|
+
import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript';
|
|
5
|
+
import arrayFunc from 'eslint-plugin-array-func';
|
|
6
|
+
import { createNodeResolver, importX } from 'eslint-plugin-import-x';
|
|
7
|
+
import jsxA11y from 'eslint-plugin-jsx-a11y-x';
|
|
8
|
+
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
|
9
9
|
import reactHooks from 'eslint-plugin-react-hooks';
|
|
10
|
+
import { defineConfig } from 'eslint/config';
|
|
10
11
|
import globals from 'globals';
|
|
11
|
-
import
|
|
12
|
-
|
|
12
|
+
import tseslint from 'typescript-eslint';
|
|
13
|
+
|
|
14
|
+
const JSX_FILES = ['**/*.jsx'];
|
|
15
|
+
const TSX_FILES = ['**/*.tsx'];
|
|
16
|
+
const TS_FILES = ['**/*.{ts,tsx,mts,cts}'];
|
|
17
|
+
|
|
18
|
+
// Rules covered by eslint-plugin-react-hooks (official, React Compiler based) are
|
|
19
|
+
// turned off in @eslint-react so that each problem is reported only once.
|
|
20
|
+
const reactHooksDuplicates = Object.fromEntries(
|
|
21
|
+
Object.keys(
|
|
22
|
+
eslintReact.configs['disable-conflict-eslint-plugin-react-hooks'].rules,
|
|
23
|
+
)
|
|
24
|
+
.map((rule) => rule.replace(/^react-hooks\//, '@eslint-react/'))
|
|
25
|
+
.map((rule) => [rule, 'off']),
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Everything is strict: rules that presets enable as warnings are reported as errors.
|
|
30
|
+
* @param {import('eslint').Linter.RulesRecord} rules
|
|
31
|
+
* @returns {import('eslint').Linter.RulesRecord}
|
|
32
|
+
*/
|
|
33
|
+
const warningsToErrors = (rules) =>
|
|
34
|
+
Object.fromEntries(
|
|
35
|
+
Object.entries(rules).map(([name, entry]) => {
|
|
36
|
+
const [severity, ...options] = Array.isArray(entry) ? entry : [entry];
|
|
37
|
+
|
|
38
|
+
if (severity !== 'warn' && severity !== 1) {
|
|
39
|
+
return [name, entry];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return [name, options.length > 0 ? ['error', ...options] : 'error'];
|
|
43
|
+
}),
|
|
44
|
+
);
|
|
13
45
|
|
|
14
|
-
|
|
15
|
-
export default defineConfig([
|
|
46
|
+
const config = defineConfig([
|
|
16
47
|
{
|
|
17
|
-
extends: [arrayFunc.configs.
|
|
18
|
-
rules: { 'array-func/prefer-array-from':
|
|
48
|
+
extends: [arrayFunc.configs.all],
|
|
49
|
+
rules: { 'array-func/prefer-array-from': 'off' },
|
|
19
50
|
},
|
|
20
51
|
{
|
|
21
52
|
extends: [js.configs.recommended],
|
|
@@ -23,19 +54,14 @@ export default defineConfig([
|
|
|
23
54
|
},
|
|
24
55
|
{
|
|
25
56
|
files: ['**/*.test.{js,ts,jsx,tsx}'],
|
|
26
|
-
|
|
27
|
-
vitest,
|
|
28
|
-
},
|
|
29
|
-
rules: {
|
|
30
|
-
...vitest.configs.recommended.rules,
|
|
31
|
-
},
|
|
57
|
+
extends: [vitest.configs.recommended],
|
|
32
58
|
},
|
|
33
59
|
{
|
|
34
|
-
extends: [
|
|
60
|
+
extends: [importX.flatConfigs.recommended],
|
|
35
61
|
rules: {
|
|
36
|
-
'import/no-deprecated': 'error',
|
|
37
|
-
'import/no-empty-named-blocks': 'error',
|
|
38
|
-
'import/no-extraneous-dependencies': [
|
|
62
|
+
'import-x/no-deprecated': 'error',
|
|
63
|
+
'import-x/no-empty-named-blocks': 'error',
|
|
64
|
+
'import-x/no-extraneous-dependencies': [
|
|
39
65
|
'error',
|
|
40
66
|
{
|
|
41
67
|
devDependencies: [
|
|
@@ -44,58 +70,55 @@ export default defineConfig([
|
|
|
44
70
|
],
|
|
45
71
|
},
|
|
46
72
|
],
|
|
47
|
-
'import/no-mutable-exports': 'error',
|
|
48
|
-
'import/no-
|
|
49
|
-
'import/no-
|
|
50
|
-
'import/no-
|
|
51
|
-
'import/
|
|
52
|
-
'import/
|
|
53
|
-
'import/
|
|
54
|
-
'import/
|
|
55
|
-
'import/first': 'error',
|
|
73
|
+
'import-x/no-mutable-exports': 'error',
|
|
74
|
+
'import-x/no-cycle': 'error',
|
|
75
|
+
'import-x/no-relative-packages': 'error',
|
|
76
|
+
'import-x/no-self-import': 'error',
|
|
77
|
+
'import-x/order': ['error', { 'newlines-between': 'never' }],
|
|
78
|
+
'import-x/no-default-export': 'error',
|
|
79
|
+
'import-x/newline-after-import': 'error',
|
|
80
|
+
'import-x/first': 'error',
|
|
56
81
|
},
|
|
57
82
|
},
|
|
83
|
+
{
|
|
84
|
+
files: TS_FILES,
|
|
85
|
+
extends: [importX.flatConfigs.typescript],
|
|
86
|
+
},
|
|
58
87
|
{
|
|
59
88
|
files: ['**/*.config.*s'],
|
|
60
89
|
rules: {
|
|
61
|
-
'import/no-default-export': 'off',
|
|
90
|
+
'import-x/no-default-export': 'off',
|
|
62
91
|
},
|
|
63
92
|
},
|
|
64
93
|
{
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
94
|
+
extends: [reactHooks.configs.flat['recommended-latest']],
|
|
95
|
+
files: [
|
|
96
|
+
'**/use*.*sx',
|
|
97
|
+
'**/use*.js',
|
|
98
|
+
'**/use*.ts',
|
|
99
|
+
...JSX_FILES,
|
|
100
|
+
...TSX_FILES,
|
|
101
|
+
],
|
|
68
102
|
},
|
|
69
103
|
{
|
|
70
|
-
extends: [
|
|
71
|
-
files:
|
|
72
|
-
rules:
|
|
73
|
-
'react-hooks/exhaustive-deps': 'error',
|
|
74
|
-
'react-hooks/rules-of-hooks': 'error',
|
|
75
|
-
},
|
|
104
|
+
extends: [eslintReact.configs.strict, jsxA11y.configs.strict],
|
|
105
|
+
files: JSX_FILES,
|
|
106
|
+
rules: reactHooksDuplicates,
|
|
76
107
|
},
|
|
77
108
|
{
|
|
78
109
|
extends: [
|
|
79
|
-
|
|
80
|
-
jsxA11y.
|
|
110
|
+
eslintReact.configs['strict-type-checked'],
|
|
111
|
+
jsxA11y.configs.strict,
|
|
81
112
|
],
|
|
82
|
-
files:
|
|
83
|
-
rules:
|
|
84
|
-
'react/react-in-jsx-scope': 'off',
|
|
85
|
-
'react/display-name': 'off',
|
|
86
|
-
},
|
|
87
|
-
settings: {
|
|
88
|
-
react: {
|
|
89
|
-
version: 'detect',
|
|
90
|
-
},
|
|
91
|
-
},
|
|
113
|
+
files: TSX_FILES,
|
|
114
|
+
rules: reactHooksDuplicates,
|
|
92
115
|
},
|
|
93
116
|
{
|
|
94
117
|
extends: [
|
|
95
118
|
tseslint.configs.strictTypeChecked,
|
|
96
119
|
tseslint.configs.stylisticTypeChecked,
|
|
97
120
|
],
|
|
98
|
-
files:
|
|
121
|
+
files: TS_FILES,
|
|
99
122
|
rules: {
|
|
100
123
|
'@typescript-eslint/consistent-type-definitions': 'off',
|
|
101
124
|
'@typescript-eslint/restrict-template-expressions': [
|
|
@@ -116,7 +139,7 @@ export default defineConfig([
|
|
|
116
139
|
'@typescript-eslint/no-empty-object-type': 'off',
|
|
117
140
|
'@typescript-eslint/non-nullable-type-assertion-style': 'error',
|
|
118
141
|
'@typescript-eslint/prefer-optional-chain': 'error',
|
|
119
|
-
'@typescript-eslint/prefer-nullish-coalescing':
|
|
142
|
+
'@typescript-eslint/prefer-nullish-coalescing': 'off',
|
|
120
143
|
},
|
|
121
144
|
},
|
|
122
145
|
{
|
|
@@ -129,12 +152,10 @@ export default defineConfig([
|
|
|
129
152
|
reportUnusedDisableDirectives: 'error',
|
|
130
153
|
},
|
|
131
154
|
settings: {
|
|
132
|
-
'import/resolver':
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
node: true,
|
|
137
|
-
},
|
|
155
|
+
'import-x/resolver-next': [
|
|
156
|
+
createTypeScriptImportResolver(),
|
|
157
|
+
createNodeResolver(),
|
|
158
|
+
],
|
|
138
159
|
},
|
|
139
160
|
},
|
|
140
161
|
eslintPluginPrettierRecommended,
|
|
@@ -149,3 +170,8 @@ export default defineConfig([
|
|
|
149
170
|
},
|
|
150
171
|
},
|
|
151
172
|
]);
|
|
173
|
+
|
|
174
|
+
// eslint-disable-next-line import-x/no-default-export
|
|
175
|
+
export default config.map((item) =>
|
|
176
|
+
item.rules ? { ...item, rules: warningsToErrors(item.rules) } : item,
|
|
177
|
+
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-fabulator",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "Shared ESLint config for fabulator projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -25,28 +25,28 @@
|
|
|
25
25
|
"release": "semantic-release"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@eslint/
|
|
29
|
-
"@
|
|
30
|
-
"eslint-
|
|
31
|
-
"eslint-
|
|
32
|
-
"eslint-
|
|
33
|
-
"eslint-plugin-
|
|
34
|
-
"eslint-plugin-
|
|
35
|
-
"eslint-plugin-
|
|
36
|
-
"eslint-plugin-
|
|
37
|
-
"eslint-plugin-react-hooks": "^7.
|
|
38
|
-
"globals": "^
|
|
39
|
-
"prettier": "^3.
|
|
40
|
-
"typescript-eslint": "^8.
|
|
28
|
+
"@eslint-react/eslint-plugin": "^5.30.6",
|
|
29
|
+
"@eslint/js": "^10.0.1",
|
|
30
|
+
"@vitest/eslint-plugin": "^1.6.28",
|
|
31
|
+
"eslint-config-prettier": "^10.1.8",
|
|
32
|
+
"eslint-import-resolver-typescript": "^4.4.5",
|
|
33
|
+
"eslint-plugin-array-func": "5.1.1",
|
|
34
|
+
"eslint-plugin-import-x": "^4.18.1",
|
|
35
|
+
"eslint-plugin-jsx-a11y-x": "^0.2.0",
|
|
36
|
+
"eslint-plugin-prettier": "^5.5.7",
|
|
37
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
38
|
+
"globals": "^17.14.0",
|
|
39
|
+
"prettier": "^3.10.1",
|
|
40
|
+
"typescript-eslint": "^8.74.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"commitlint-config-fabulator": "^6.1.0",
|
|
44
|
-
"eslint": "^
|
|
44
|
+
"eslint": "^10.15.0",
|
|
45
45
|
"semantic-release-config-fabulator": "^7.0.0",
|
|
46
|
-
"typescript": "
|
|
46
|
+
"typescript": "~6.0.3"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"eslint": "^
|
|
50
|
-
"typescript": "^5"
|
|
49
|
+
"eslint": "^10",
|
|
50
|
+
"typescript": "^5 || ~6.0"
|
|
51
51
|
}
|
|
52
52
|
}
|