fix: update ESLint scanning workflow to use project's ESLint 10#162
Conversation
Co-authored-by: HollowMan6 <43995067+HollowMan6@users.noreply.github.com>
9558851
into
dependabot/npm_and_yarn/main/eslint-10.0.1
There was a problem hiding this comment.
Pull request overview
Updates the dedicated ESLint SARIF scanning workflow to rely on the repository’s declared ESLint version (ESLint 10) rather than hardcoding an older ESLint install that conflicts with the project’s dependency set.
Changes:
- Replace
npm install eslint@^8.0.0withnpm installso the workflow uses the project’spackage.json/lockfile ESLint version. - Install
@microsoft/eslint-formatter-sarif@2.1.7with--legacy-peer-depsto bypass its outdated peer dependency range while still generating SARIF output.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| npm install eslint@^8.0.0 | ||
| npm install @microsoft/eslint-formatter-sarif@2.1.7 | ||
| npm install | ||
| npm install --legacy-peer-deps @microsoft/eslint-formatter-sarif@2.1.7 |
There was a problem hiding this comment.
Installing @microsoft/eslint-formatter-sarif as a separate npm install step will typically update package-lock.json/package.json in the runner workspace and can make the job less reproducible. Consider either (a) committing the formatter as a devDependency and using a single lockfile-driven install, or (b) installing it with flags that avoid saving/updating the lockfile (e.g., --no-save / --no-package-lock) so the workflow doesn’t mutate the checked-out repo during CI.
| npm install --legacy-peer-deps @microsoft/eslint-formatter-sarif@2.1.7 | |
| npm install --no-save --no-package-lock --legacy-peer-deps @microsoft/eslint-formatter-sarif@2.1.7 |
* 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.
The
ESLint / Run eslint scanningCI job was failing because.github/workflows/eslint.ymlhardcodednpm install eslint@^8.0.0, which npm rejects with a peer dependency conflict against the project'spackage.jsonspecifying"eslint": "^10.0.2".npm install eslint@^8.0.0withnpm installto consume ESLint 10 from the project's ownpackage.json--legacy-peer-depswhen installing@microsoft/eslint-formatter-sarif@2.1.7, since it declares a peer dependency oneslint@^7||^8but works functionally with ESLint 10Additional context
No other changes needed. The Node.js lint workflow was already passing after the earlier ESLint 10 fixes in #161.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.