Skip to content

chore: bump eslint to 10.3.0 + migrate config (drop eslint-plugin-header, switch to eslint-plugin-import-x)#162

Merged
layershifter merged 2 commits intomainfrom
dependabot/npm_and_yarn/eslint-6c0cf89f9d
May 6, 2026
Merged

chore: bump eslint to 10.3.0 + migrate config (drop eslint-plugin-header, switch to eslint-plugin-import-x)#162
layershifter merged 2 commits intomainfrom
dependabot/npm_and_yarn/eslint-6c0cf89f9d

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github May 6, 2026

Summary

Bumps eslint from 9.39.4 to 10.3.0 (dependabot's original bump) and migrates the project's lint setup to be ESLint 10–compatible.

What ESLint 10 broke

ESLint 10 removes the legacy context.getSourceCode() API and tightens peer-dep handling. Two plugins this project used don't survive:

  • eslint-plugin-header@3.1.1 — the entire plugin relies on context.getSourceCode(). No maintained release supports ESLint 10. Dropped, along with the Microsoft copyright-header rule. The rule can be reintroduced via a custom rule or a different plugin when one becomes available.
  • eslint-plugin-import@2.32.0 — peer range stops at ESLint 9. Replaced with eslint-plugin-import-x (the actively-maintained fork; supports ESLint 8/9/10). The import/order rule becomes import-x/order.

Other dependency changes

  • Add @eslint/js@^10.0.1 as an explicit devDep — under yarn 4 strict peer-dep handling it isn't hoisted from eslint's transitive graph anymore.
  • Add eslint-import-resolver-typescript@^4.4.4 — required by importX.flatConfigs.typescript to resolve .ts/.tsx paths.
  • Pin all three to current latest minor.patch (^10.0.1, ^4.4.4, ^4.16.2).

Config modernization

Adopts the defineConfig helper from eslint/config (ESLint 10's recommended setup):

// @ts-check

import js from "@eslint/js";
import { defineConfig } from "eslint/config";
import eslintConfigPrettier from "eslint-config-prettier";
import importX from "eslint-plugin-import-x";
import tseslint from "typescript-eslint";

export default defineConfig(
  { ignores: ["*.config.*", "dist/**"] },
  js.configs.recommended,
  tseslint.configs.recommended,
  importX.flatConfigs.recommended,
  importX.flatConfigs.typescript,
  eslintConfigPrettier,
  { /* custom rules */ },
);

Custom rules and parser options preserved as-is.

Verification (Node 24)

  • yarn install --immutable clean
  • yarn dedupe --check clean
  • yarn lint clean
  • yarn format clean
  • yarn build clean
  • yarn test → 14/14 playwright tests pass

Follow-ups

  • The Microsoft copyright-header rule needs a replacement when one ships for ESLint 10. Tracked separately.

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels May 6, 2026
@dependabot dependabot Bot requested review from a team and mshoho as code owners May 6, 2026 17:42
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels May 6, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

📊 Bundle size report

✅ No changes found

@dependabot dependabot Bot changed the title chore(deps-dev): bump eslint from 9.39.4 to 10.3.0 in the eslint group chore(deps-dev): bump eslint from 9.39.4 to 10.3.0 in the eslint group across 1 directory May 6, 2026
@dependabot dependabot Bot force-pushed the dependabot/npm_and_yarn/eslint-6c0cf89f9d branch 5 times, most recently from 0d1c9ac to 6a58b91 Compare May 6, 2026 18:57
Bumps the eslint group with 1 update in the / directory: [eslint](https://github.com/eslint/eslint).


Updates `eslint` from 9.39.4 to 10.3.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](eslint/eslint@v9.39.4...v10.3.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.3.0
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot force-pushed the dependabot/npm_and_yarn/eslint-6c0cf89f9d branch from 6a58b91 to e513c0a Compare May 6, 2026 19:38
ESLint 10 removed the legacy context.getSourceCode API and tightened
peer-dep handling, breaking two plugins this project used:

- eslint-plugin-header@3.1.1 — relies on context.getSourceCode().
  No maintained version supports ESLint 10. Dropped along with the
  Microsoft copyright-header rule (the rule itself can be reintroduced
  via a different plugin or a custom rule when one becomes available).
- eslint-plugin-import@2.32.0 — peer range only allows ESLint <= 9.
  Replaced with the actively-maintained fork eslint-plugin-import-x,
  which supports ESLint 8/9/10. Adds eslint-import-resolver-typescript
  for the typescript resolver expected by importX.flatConfigs.typescript.

Also adopts the modern flat-config helper from eslint/config:

  import { defineConfig } from 'eslint/config';
  export default defineConfig(...);

Adds @eslint/js as an explicit devDep — under yarn 4 strict peer
handling it isn't hoisted by transitive resolution from eslint alone.

Verified: yarn lint, yarn format, yarn build, yarn test (14/14)
all pass on Node 24 with eslint 10.3.0.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@layershifter layershifter force-pushed the dependabot/npm_and_yarn/eslint-6c0cf89f9d branch from 9411c66 to d02cf02 Compare May 6, 2026 19:42
@layershifter layershifter enabled auto-merge (squash) May 6, 2026 19:44
@layershifter layershifter changed the title chore(deps-dev): bump eslint from 9.39.4 to 10.3.0 in the eslint group across 1 directory chore: bump eslint to 10.3.0 + migrate config (drop eslint-plugin-header, switch to eslint-plugin-import-x) May 6, 2026
@layershifter layershifter merged commit bc4de82 into main May 6, 2026
7 checks passed
@dependabot dependabot Bot deleted the dependabot/npm_and_yarn/eslint-6c0cf89f9d branch May 6, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants