Skip to content

fix: update ESLint scanning workflow to use project's ESLint 10#162

Merged
HollowMan6 merged 2 commits into
dependabot/npm_and_yarn/main/eslint-10.0.1from
copilot/sub-pr-159
Feb 27, 2026
Merged

fix: update ESLint scanning workflow to use project's ESLint 10#162
HollowMan6 merged 2 commits into
dependabot/npm_and_yarn/main/eslint-10.0.1from
copilot/sub-pr-159

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 27, 2026

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 scanning CI job was failing because .github/workflows/eslint.yml hardcoded npm install eslint@^8.0.0, which npm rejects with a peer dependency conflict against the project's package.json specifying "eslint": "^10.0.2".

  • Replace npm install eslint@^8.0.0 with npm install to consume ESLint 10 from the project's own package.json
  • Add --legacy-peer-deps when installing @microsoft/eslint-formatter-sarif@2.1.7, since it declares a peer dependency on eslint@^7||^8 but works functionally with ESLint 10
- name: Install
  run: |
    npm install
    npm install --legacy-peer-deps @microsoft/eslint-formatter-sarif@2.1.7

Additional 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.

Co-authored-by: HollowMan6 <43995067+HollowMan6@users.noreply.github.com>
Copilot AI changed the title [WIP] Update eslint dependency from 9.39.2 to 10.0.1 fix: update ESLint scanning workflow to use project's ESLint 10 Feb 27, 2026
@HollowMan6 HollowMan6 marked this pull request as ready for review February 27, 2026 13:36
Copilot AI review requested due to automatic review settings February 27, 2026 13:36
@HollowMan6 HollowMan6 merged commit 9558851 into dependabot/npm_and_yarn/main/eslint-10.0.1 Feb 27, 2026
1 check passed
@HollowMan6 HollowMan6 deleted the copilot/sub-pr-159 branch February 27, 2026 13:36
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.0 with npm install so the workflow uses the project’s package.json/lockfile ESLint version.
  • Install @microsoft/eslint-formatter-sarif@2.1.7 with --legacy-peer-deps to 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
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
HollowMan6 added a commit that referenced this pull request Feb 27, 2026
* 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>
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.

3 participants