fix: ESLint 10 CI lint failures#161
Conversation
…ssignment error Co-authored-by: HollowMan6 <43995067+HollowMan6@users.noreply.github.com>
4b50aab
into
dependabot/npm_and_yarn/main/eslint-10.0.1
There was a problem hiding this comment.
Pull request overview
This PR fixes CI lint failures after upgrading to ESLint 10 by aligning the repo’s tooling dependencies and CI runtime with ESLint 10’s new requirements.
Changes:
- Add
@eslint/jsas an explicit dependency to satisfy ESLint 10’s unbundling. - Update the GitHub Actions lint workflow to use Node 20 (instead of 18).
- Remove a useless assignment flagged by ESLint 10 (
no-useless-assignment) in the GNOME extension code.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
package.json |
Adds @eslint/js dependency required by the existing flat config import. |
package-lock.json |
Locks @eslint/js and associated metadata for reproducible installs. |
customize-ibus@hollowman.ml/extension.js |
Removes an initializer that is immediately overwritten, satisfying ESLint 10’s recommended rules. |
.github/workflows/npm-lint.yml |
Bumps CI Node version to address ESLint 10 engine requirements. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 18 | ||
| node-version: 20 |
There was a problem hiding this comment.
node-version: 20 may still install a Node 20.x release below ESLint 10's required engine (^20.19.0 || ^22.13.0 || >=24 as recorded in the lockfile), which can make the workflow flaky depending on what version setup-node resolves. Consider pinning the workflow to a minimum compatible version (e.g. 20.19.0 or 22.13.0) to match ESLint's engine requirement deterministically.
| node-version: 20 | |
| node-version: '20.19.0' |
* chore(deps): bump eslint from 9.39.2 to 10.0.1 Bumps [eslint](https://github.com/eslint/eslint) from 9.39.2 to 10.0.1. - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](eslint/eslint@v9.39.2...v10.0.1) --- updated-dependencies: - dependency-name: eslint dependency-version: 10.0.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * fix: ESLint 10 CI lint failures (#161) * Initial plan * fix: update Node.js to 20 in CI, add @eslint/js dep, fix no-useless-assignment error Co-authored-by: HollowMan6 <43995067+HollowMan6@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: HollowMan6 <43995067+HollowMan6@users.noreply.github.com> * fix: update ESLint scanning workflow to use project's ESLint 10 (#162) * Initial plan * fix: update ESLint scanning workflow to use project's ESLint 10 Co-authored-by: HollowMan6 <43995067+HollowMan6@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: HollowMan6 <43995067+HollowMan6@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: HollowMan6 <43995067+HollowMan6@users.noreply.github.com>
Is your PR related to an issue? Please describe.
No.
Describe what problem you have solved or what feature you have added.
CI lint job was failing after bumping ESLint 9→10 due to three breaking changes:
npm-lint.yml): ESLint 10 requires^20.19.0 || ^22.13.0 || >=24; CI was pinned to Node 18. Updated to Node 20.@eslint/jsdep (package.json): ESLint 10 unbundled@eslint/jsinto a standalone package. Added it explicitly.no-useless-assignmenterror (extension.js:635): This rule was promoted intojs.configs.recommendedin ESLint 10. Fixed the useless initializer:Additional context
All pre-existing
no-shadowwarnings are unrelated and unchanged.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.