Skip to content

chore(deps): update eslint to v10 and @antfu/eslint-config to v10 - #30

Merged
CodeDredd merged 2 commits into
mainfrom
chore/eslint-flat-config
Nov 24, 2026
Merged

CodeDredd merged 2 commits into
mainfrom
chore/eslint-flat-config

Conversation

@CodeDredd

Copy link
Copy Markdown
Owner

What

before after
eslint ^8.48.0 ^10.15.0
@antfu/eslint-config ^0.41.0 ^10.0.0
config .eslintrc eslint.config.js (flat config)

@antfu/eslint-config no longer supports the legacy .eslintrc format, hence the move to eslint.config.js.

The large diff is purely the new rule set's autofix — no behaviour changes:

  • sorted imports / exports (perfectionist/sort-*) and JSON keys (tsconfig.json, package.json#files)
  • comma member delimiters in type literals
  • line breaks in multi-item literals and ternaries (antfu/reasonable-newline)

Manual changes:

  • jsdoc/require-returns-description is off — the JSDoc in this repo types the return value (@returns { boolean }) and describes it in the summary. Otherwise that's 19 warnings for the existing convention.
  • The pnpm plugin enforces its recommended pnpm-workspace.yaml settings (trustPolicy: no-downgrade, shellEmulator: true, …). They're ignored by pnpm 8 and only take effect from pnpm 10.
  • README: the utility sub-headings were #### directly under ## (now ###), and the sponsors image has alt text.

Verified locally

  • pnpm lint: 0 errors, 0 warnings (was 3 warnings)
  • pnpm build ✅
  • tests on h3 2.0.8 and 1.15.11 ✅

The remaining dev dependencies follow in a separate PR.

`@antfu/eslint-config` dropped the legacy `.eslintrc` format, so the config
moves to `eslint.config.js`. Everything else is the new rule set's
autofix: sorted imports / exports / JSON keys, comma member delimiters and
line breaks in multi-item literals and ternaries. No behaviour changes.

- `jsdoc/require-returns-description` is turned off: the JSDoc here types
  the return value and describes it in the summary.
- The pnpm plugin adds its recommended `pnpm-workspace.yaml` settings
  (`trustPolicy: no-downgrade`, `shellEmulator`); they only apply from
  pnpm 10 on.
- README: utility headings are `###` now (no skipped level) and the
  sponsors image has alt text.
eslint-plugin-unicorn, pulled in by @antfu/eslint-config 10, uses
Set.prototype.union, which Node 20 lacks. Linting is dev tooling only; the
test matrix keeps covering the Node 20 runtime floor.
@CodeDredd
CodeDredd merged commit 73af68b into main Nov 24, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant