Skip to content

fix(oxc): show each lint rule when markers share a column - #657

Closed
SaKaNa-Y wants to merge 2 commits into
vitejs:mainfrom
SaKaNa-Y:fix/oxc-lint-marker-attribution
Closed

SaKaNa-Y wants to merge 2 commits into
vitejs:mainfrom
SaKaNa-Y:fix/oxc-lint-marker-attribution

Conversation

@SaKaNa-Y

@SaKaNa-Y SaKaNa-Y commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

When no-console warns about console.log(tag) and no-restricted-properties forbids console.log, both rules flag the same column. The Oxc Lint Inspector counts one warning and one error, but both source markers show no-console and link to its documentation.

- Sort the labels by column, then look up the first diagnostic at each column.
+ Keep each label with its diagnostic and sort the pairs by column.

Evidence

  • Before: Both markers show the yellow no-console warning.

    Two yellow no-console markers under console.log(tag).

    After: The red no-restricted-properties error shows “Use the project logger.” The yellow no-console warning appears below it.

    The restricted-property error and its tooltip above the no-console warning.

Merge Danger

Door: Two-way

A revert restores the previous marker display.

Blast Radius: Rendering

Every source marker in Oxc lint results uses LineError.vue. The risk is medium because a wrong match can show another rule's advice or link.

Keep each label with its diagnostic while sorting the markers. Matching a label by column made unrelated diagnostics at the same position share a rule name, severity, tooltip and documentation link.
@pkg-pr-new

pkg-pr-new Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@vitejs/devtools

npm i https://pkg.pr.new/@vitejs/devtools@657

@vitejs/devtools-kit

npm i https://pkg.pr.new/@vitejs/devtools-kit@657

@vitejs/devtools-oxc

npm i https://pkg.pr.new/@vitejs/devtools-oxc@657

@vitejs/devtools-rolldown

npm i https://pkg.pr.new/@vitejs/devtools-rolldown@657

@vitejs/devtools-vite

npm i https://pkg.pr.new/@vitejs/devtools-vite@657

@vitejs/devtools-vite-task

npm i https://pkg.pr.new/@vitejs/devtools-vite-task@657

@vitejs/devtools-vitest

npm i https://pkg.pr.new/@vitejs/devtools-vitest@657

commit: 676b55d

@SaKaNa-Y SaKaNa-Y closed this Dec 2, 2026
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