Skip to content

Fix ESLint workflow failure caused by SARIF formatter runtime mismatch#50

Merged
JosunLP merged 4 commits intoJosunLP-patch-1from
copilot/sub-pr-45
Mar 12, 2026
Merged

Fix ESLint workflow failure caused by SARIF formatter runtime mismatch#50
JosunLP merged 4 commits intoJosunLP-patch-1from
copilot/sub-pr-45

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 12, 2026

The ESLint GitHub Action was failing on this PR because the SARIF formatter path was invoking an incompatible ESLint 8 runtime against the repo’s ESLint 9 flat-config setup. This change keeps the workflow’s code-scanning output intact while removing the runtime conflict.

  • Root cause addressed

    • Stop using @microsoft/eslint-formatter-sarif as the execution path for linting in CI.
    • Avoid the transitive ESLint 8 dependency that was crashing rule loading in the workflow.
  • Workflow changes

    • Run the repository’s installed ESLint directly via bunx eslint.
    • Emit standard ESLint JSON results to eslint-results.json.
    • Convert ESLint JSON to SARIF in an inline Node step before upload.
    • Keep the existing SARIF upload flow to GitHub code scanning unchanged.
  • SARIF generation

    • Map ESLint messages to SARIF results with:
      • normalized relative file paths,
      • stable rule metadata,
      • warning/error severity mapping,
      • line/column region data.
    • Preserve SRCROOT base URI handling for uploaded findings.

Example of the workflow change:

- name: Run ESLint
  run: |
    bunx eslint . \
      --format json \
      --output-file eslint-results.json

- name: Convert ESLint results to SARIF
  run: |
    node <<'EOF'
    // reads eslint-results.json and writes eslint-results.sarif
    EOF

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI and others added 2 commits March 12, 2026 16:07
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Copilot AI changed the title [WIP] Add improvements to bQuery.js documentation and workflows Fix ESLint workflow failure caused by SARIF formatter runtime mismatch Mar 12, 2026
@JosunLP JosunLP marked this pull request as ready for review March 12, 2026 16:10
Copilot AI review requested due to automatic review settings March 12, 2026 16:10
Copy link
Copy Markdown
Contributor

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 ESLint Code Scanning workflow to avoid the ESLint 8 runtime pulled in by @microsoft/eslint-formatter-sarif, while preserving SARIF upload to GitHub code scanning.

Changes:

  • Run the repo’s ESLint directly via bunx eslint and emit JSON to eslint-results.json.
  • Add an inline Node step to convert ESLint JSON output into eslint-results.sarif.
  • Keep the existing SARIF upload step (github/codeql-action/upload-sarif@v4) intact.

@JosunLP
Copy link
Copy Markdown
Collaborator

JosunLP commented Mar 12, 2026

@copilot apply changes based on the comments in this thread

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 12, 2026

@copilot apply changes based on the comments in this thread

Applied in 1bf9690. I removed the unused formatter-specific env var and switched the SARIF SRCROOT URI generation to pathToFileURL(...) so the uploaded file URI stays valid across platforms.

Copy link
Copy Markdown
Contributor

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@JosunLP JosunLP merged commit d735e84 into JosunLP-patch-1 Mar 12, 2026
6 checks passed
@JosunLP JosunLP deleted the copilot/sub-pr-45 branch March 12, 2026 16:22
JosunLP added a commit that referenced this pull request Mar 12, 2026
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Jonas Pfalzgraf <info@josunlp.de>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Fix PR review issues: duplicate keys, cleanup leaks, export conflicts, and SSR safety (#17)
Fix security, type safety, and API surface issues from PR #16 review (#18)
Fix router cancellation, component example, and ref directive expression handling (#19)
Fix router compatibility, isDev default, style cleanup, and changelog format (#20)
Fix hash routing bugs and add comprehensive test coverage (#21)
Fix router base path handling, bq-if DOM stability, and CHANGELOG consistency (#22)
Fix defineComponent tests, store reactivity leak, view directive signal handling, and hash-routing interception (#24)
Fix async handling, type safety, environment guards, and add test coverage from PR #16 review (#25)
Fix DOM order reversal, stale dependency tracking, localStorage SafariError, and reactive bq-for updates (#26)
Fix view template root validation, store optimizations, and utils API cleanup (#27)
Fix bq-show display restoration and timeline.seek() time calculation (#28)
Fix router base path duplication and add SSR guards for Element checks (#29)
Fix interceptLinks() browser behavior and createTemplate() validation (#30)
Fix bq-class bracket detection, once() failure caching, mount bq-for validation, and component pre-mount renders (#31)
Fix bq-style whitespace handling and spring variable frame rate (#32)
Fix bq-on method reference context loss and remove style attribute from security defaults (#33)
Fix persistedSignal localStorage test key collision (#34)
Fix bq-class directive stale class cleanup for object syntax (#35)
Fix timeline() to account for animation iterations in duration calculations (#36)
fix: Reactive robustness, security hardening, storage compat, expression parsing (#37)
Fix css() getter, add Signal.dispose(), debounce/throttle cancel, collection.find(), element.is() (#39)
fix(ci): align ESLint workflow with repo CI conventions (#47)
fix: repair corrupted bun.lock breaking CI frozen-lockfile installs (#48)
Fix ESLint workflow failure caused by SARIF formatter runtime mismatch (#50)
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