Skip to content

Upgrade ESLint to v10.4.0 with flat config#3572

Merged
zinduolis merged 2 commits into
masterfrom
red/eslint-upgrade
May 19, 2026
Merged

Upgrade ESLint to v10.4.0 with flat config#3572
zinduolis merged 2 commits into
masterfrom
red/eslint-upgrade

Conversation

@zinduolis
Copy link
Copy Markdown
Contributor

Pull Request

Thanks for submitting a PR! Please fill in this template where appropriate:

Category

Core Functionality, CI

Feature/Issue Description

Q: Please give a brief summary of your feature/fix

A: Upgrades ESLint from v7.32.0 to v10.4.0 and migrates the configuration from the legacy .eslintrc.json format to the new flat config (eslint.config.js). Also pins all devDependency versions exactly and adds .npmrc with min-release-age=3 for supply-chain safety.

Q: Give a technical rundown of what you have changed (if applicable)

A:

  • Deleted .eslintrc.json — ESLint 10 removed support for the legacy config format entirely.
  • Created eslint.config.js — Equivalent flat config with the same rules, globals, and ignore patterns. Uses @eslint/js for recommended rules and the globals package for browser globals (replaces "env": { "browser": true }).
  • Updated package.json:
    • eslint: 7.32.010.4.0
    • Added @eslint/js: 10.0.1
    • Added globals: 17.6.0
    • All versions pinned exactly (no ^ or ~)
    • Lint scripts updated to target . (flat config handles ignores internally)
  • Created .npmrc — Sets min-release-age=3 to refuse packages published less than 3 days ago (requires npm 11.10+, currently active in CI on Node 24).
  • Updated .github/workflows/eslint.yml — Changed npx eslint "**/*.js" to npx eslint . in the report-only job to align with flat config file resolution.
  • Regenerated package-lock.json with the new dependency tree.

Test Cases

Q: Describe your test cases, what you have covered and if there are any use cases that still need addressing.

A: Ran both CI jobs locally using act:

  • lint-all-files — ESLint 10 ran successfully against the full codebase. 5654 pre-existing errors reported (same issues ESLint 7 would flag). Job completed with success (non-blocking, continue-on-error: true).
  • lint-changed-files — No JS files in the test diff, correctly skipped linting. Job completed with success.

No new lint errors were introduced by this change. All errors are pre-existing codebase issues.

Wiki Page

N/A — no new user-facing features. The linting infrastructure is transparent to contributors; npm run lint continues to work as before.

@zinduolis zinduolis added the safe_to_test Label to trigger tests on PR label May 19, 2026
@github-actions github-actions Bot removed the safe_to_test Label to trigger tests on PR label May 19, 2026
@zinduolis zinduolis added the safe_to_test Label to trigger tests on PR label May 19, 2026
@github-actions github-actions Bot removed the safe_to_test Label to trigger tests on PR label May 19, 2026
@zinduolis zinduolis merged commit 0e84ba4 into master May 19, 2026
8 checks passed
@zinduolis zinduolis deleted the red/eslint-upgrade branch May 19, 2026 10:06
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