Releases: vp-tw/eslint-config
Releases · vp-tw/eslint-config
@vp-tw/eslint-config@2.0.0
Major Changes
-
a73e803: BREAKING CHANGE: Upgrade core tooling and ESLint ecosystem to their latest majors.
eslint:^9.39.2→^10.2.1(removes eslintrc support; flat config required; requires Node^20.19.0 || ^22.13.0 || >=24)@antfu/eslint-config:^7.2.0→^8.2.0@eslint-react/eslint-plugin:^2.7.4→^4.2.3(all sub-plugins merged into a single@eslint-reactplugin; rule names are now flat, e.g.@eslint-react/dom-no-unsafe-target-blankinstead of@eslint-react/dom/no-unsafe-target-blank)@eslint/config-inspector:^1.4.2→^2.0.0eslint-plugin-react-refresh:^0.4.26→^0.5.2eslint-plugin-package-json:^0.88.2→^0.91.1(new required rules:require-repository,require-sideEffects)typescript:^5.9.3→^6.0.3(new defaults:strict: true,target: es2025,module: esnext,rootDir: ".",types: [],noUncheckedSideEffectImports: true)@typescript/native-preview(tsgo):^7.0.0-dev.20251219.1→^7.0.0-dev.20260421.2@vp-tw/tsconfig:^3.2.1→^5.0.0- Node.js:
.nvmrcbumped tov25.9.0
Internal changes to keep the config usable after the upstream shifts:
- Add an override for
antfu/react/setupthat strips removed sub-plugin keys (react-dom,react-naming-convention,react-rsc,react-web-api) and keeps only the unifiedreactandreact-refreshentries. ESLint tolerates antfu's hardcodedreact-dom/*: "off"rules because their level isoff. - Extend the storybook config's plugin rename map with
react-hooks→reactsoeslint-plugin-storybook's built-inreact-hooks/rules-of-hooks: "off"override for*.stories.*files continues to work against@eslint-react'sreact/rules-of-hooks. This can be removed wheneslint-plugin-storybooktargets@eslint-reactdirectly. - Add
pnpm.overridesforundici-typesto satisfytrustPolicy: no-downgrade. - Add
@types/nodeto satisfy TypeScript 6's new empty-typesdefault for files that use Node APIs. - Update rule-disable directives in internal fixtures from v3 sub-plugin names (
react-hooks/rules-of-hooks,react-hooks/exhaustive-deps,react-dom/no-unsafe-target-blank) to v4 flat names under the unifiedreactplugin. - Update typegen script to reflect antfu v8's renamed/added config names (
antfu/markdown/disables/code,antfu/angular/*,antfu/react/typescript, etc.). - Replace the project-level
ReplaceAntfuEslintRulesWithVpRulesDeeplydeep type transform (which now exceeds TypeScript 6's instantiation depth on antfu v8'sOptionsConfig) with a declaration-merge that extends@antfu/eslint-config'sRuleOptionsinterface with the project's generated rule names. Everyoverrides?: Rulesfield in antfu's option tree (including deeply nested ones likereact.overrides,typescript.overrides, etc.) continues to autocomplete the rule names this config contributes (react/dom-*,@emotion/*,@tanstack/query/*,mdx/*,storybook/*,react-compiler/*). The project-owned option shape is extracted into a sharedVpOptionsinterface soOptionsandkeyofderivations stay in sync. - Add
repositoryandsideEffectsfields topackage.jsonfor the neweslint-plugin-package-jsonrequirements. - Migrate
.eslintignoreto a flat-configignoresblock ineslint.config.ts(ESLint 10 no longer supports the file) and drop the now-unused@eslint/compat-basedincludeIgnoreFilewiring. - Remove the now-unused
eslint-plugin-react-hooksdependency:@antfu/eslint-configv8 no longer registers the plugin and@eslint-reactv4 owns the hook rules under thereact/prefix.
Downstream consumers of
@vp-tw/eslint-configshould:- Require Node.js
^20.19.0 || ^22.13.0 || >=24. - Update any existing
eslint-disablecomments that reference sub-plugin rule names removed in@eslint-reactv4 — all five sub-plugin namespaces are folded into the unifiedreactplugin with flat rule names:react-dom/<rule>→react/dom-<rule>react-hooks/<rule>→react/<rule>react-hooks-extra/<rule>→react/hooks-extra-<rule>react-naming-convention/<rule>→react/naming-convention-<rule>react-web-api/<rule>→react/web-api-<rule>
- Review any
types: []TypeScript 6 fallout (e.g. add@types/node+"types": ["node"]in tsconfig for files that rely on Node globals). - If your pnpm workspace uses
trustPolicy: no-downgradeand you hit a downgrade error onundici-types, add an override for it:# pnpm-workspace.yaml overrides: undici-types: "^8.1.0"
@vp-tw/eslint-config@1.0.2
Patch Changes
- 421cfbe: fix: add explicit type annotation to
extendsConfigto resolve TS2742 build error
@vp-tw/eslint-config@0.2.0
Minor Changes
- 4afc2fe: chore: update deps
@vp-tw/eslint-config@0.1.6
Patch Changes
- a8b5090: Update dependencies to the latest versions
@vp-tw/eslint-config@0.1.5
Patch Changes
-
95ac0f0: copy first then build
Fix GitHub Actions failure: build: bump version (#12) #3 > Release