eslint-config-fabulator 6.0.0 → 6.1.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/index.js +24 -4
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
|
|
4
|
+
## v6.1.0 (2026-11-24)
|
|
5
|
+
### Fixed
|
|
6
|
+
- [2742a44](https://github.com/fabulator/eslint-config-fabulator/commit/2742a444067a61841fc50c7eea53a9c95446ce73) Apply Vitest rules only in projects that use Vitest (#247)
|
|
7
|
+
|
|
8
|
+
Projects testing with node:test got Vitest errors on *.test.js files and the autofix
|
|
9
|
+
rewrote node:test imports to vitest. Vitest rules are now enabled only when vitest
|
|
10
|
+
is resolvable from the project root.
|
|
11
|
+
|
|
12
|
+
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
|
13
|
+
|
|
14
|
+
## v6.0.1 (2026-11-24)
|
|
15
|
+
### Fixed
|
|
16
|
+
- [3fd8792](https://github.com/fabulator/eslint-config-fabulator/commit/3fd8792ad28c313952e9e0d127fa1f5f655bee95) Publish to npm via trusted publishing (#245)
|
|
17
|
+
|
|
18
|
+
- semantic-release-config-fabulator 8 (semantic-release 26, npm trusted publishing via OIDC)
|
|
19
|
+
- workflow: id-token: write, persist-credentials: false so the release is pushed with GHUB_BOT_TOKEN
|
|
20
|
+
- workflow: actions/checkout v7, actions/setup-node v7, Node.js 26.13.1
|
|
21
|
+
- workflow: release only on master, concurrency, read-only default token, timeout, full git history
|
|
22
|
+
- normalize repository.url in package.json
|
|
23
|
+
- regenerate package-lock.json
|
|
24
|
+
|
|
25
|
+
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
|
26
|
+
|
|
4
27
|
## v6.0.0 (2026-11-24)
|
|
5
28
|
### Changed
|
|
6
29
|
- [453404c](https://github.com/fabulator/eslint-config-fabulator/commit/453404c29713bcdb41ea5cc4359ec5946f6363d4) Upgrade to ESLint 10 and strictest presets BREAKING (#244)
|
package/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';
|
|
2
|
+
import path from 'node:path';
|
|
1
3
|
import eslintReact from '@eslint-react/eslint-plugin';
|
|
2
4
|
import js from '@eslint/js';
|
|
3
5
|
import vitest from '@vitest/eslint-plugin';
|
|
@@ -15,6 +17,20 @@ const JSX_FILES = ['**/*.jsx'];
|
|
|
15
17
|
const TSX_FILES = ['**/*.tsx'];
|
|
16
18
|
const TS_FILES = ['**/*.{ts,tsx,mts,cts}'];
|
|
17
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Vitest rules make sense only in projects that test with Vitest. Elsewhere (e.g. `node:test`)
|
|
22
|
+
* they would report false positives and their autofix would rewrite imports to `vitest`.
|
|
23
|
+
* ESLint runs from the project root, so Vitest is resolved from there.
|
|
24
|
+
*/
|
|
25
|
+
const usesVitest = (() => {
|
|
26
|
+
try {
|
|
27
|
+
createRequire(path.join(process.cwd(), 'package.json')).resolve('vitest');
|
|
28
|
+
return true;
|
|
29
|
+
} catch {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
})();
|
|
33
|
+
|
|
18
34
|
// Rules covered by eslint-plugin-react-hooks (official, React Compiler based) are
|
|
19
35
|
// turned off in @eslint-react so that each problem is reported only once.
|
|
20
36
|
const reactHooksDuplicates = Object.fromEntries(
|
|
@@ -52,10 +68,14 @@ const config = defineConfig([
|
|
|
52
68
|
extends: [js.configs.recommended],
|
|
53
69
|
rules: { 'no-irregular-whitespace': 'off', 'no-console': 'error' },
|
|
54
70
|
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
71
|
+
...(usesVitest
|
|
72
|
+
? [
|
|
73
|
+
{
|
|
74
|
+
files: ['**/*.test.{js,ts,jsx,tsx}'],
|
|
75
|
+
extends: [vitest.configs.recommended],
|
|
76
|
+
},
|
|
77
|
+
]
|
|
78
|
+
: []),
|
|
59
79
|
{
|
|
60
80
|
extends: [importX.flatConfigs.recommended],
|
|
61
81
|
rules: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-fabulator",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "Shared ESLint config for fabulator projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
17
|
-
"url": "https://github.com/fabulator/eslint-config-fabulator.git"
|
|
17
|
+
"url": "git+https://github.com/fabulator/eslint-config-fabulator.git"
|
|
18
18
|
},
|
|
19
19
|
"license": "Apache-2.0",
|
|
20
20
|
"author": "Michal Ozogán <michal@ozogan.eu>",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"commitlint-config-fabulator": "^6.1.0",
|
|
44
44
|
"eslint": "^10.15.0",
|
|
45
|
-
"semantic-release-config-fabulator": "^
|
|
45
|
+
"semantic-release-config-fabulator": "^8.0.1",
|
|
46
46
|
"typescript": "~6.0.3"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|