Skip to content

feat(lint): each diagnostic carries its rule's severity - #280

Merged
vite-hub[bot] merged 1 commit into
mainfrom
feat/lint-severities
Oct 30, 2026
Merged

vite-hub[bot] merged 1 commit into
mainfrom
feat/lint-severities

Conversation

@onmax

@onmax onmax commented Oct 30, 2026

Copy link
Copy Markdown
Owner

lint() and lintFiles() now return severity ("error" or "warn") on every diagnostic. It's the same severity Vite Doctor and ESLint report for the rule.

Until now a script calling lint() couldn't tell errors from warnings: the index exports rule titles only. Drop refuses a publish on Comark errors, and has had to copy the error rules by hand and test that the copy matches comark-linter/doctor's catalog. With this, a caller reads diagnostic.severity.

  • The rule code still builds severity-less findings (Finding, private to the package). lint() adds the severity from the catalog when it returns results, so no rule changes.
  • The CLI's --format json output now includes severity. Its text output is unchanged.
  • The ESLint worker doesn't send severity across, since ESLint takes it from its own config.
  • Docs: getting-started and the README describe the field.

Checks: pnpm typecheck, vp lint and vp fmt --check on packages/lint, the package's 77 tests (including a new one for a core error, a core warning and a package rule), and pnpm run doctor in packages/lint.

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T11:48:37.774075Z 7c2a59c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@vite-hub

vite-hub Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —
View session Waiting 2026-10-30T11:57:25.628Z 4m 31s

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

Session

Waiting for GitHub merge request b6c451c6-3c12-41a4-8841-1a8a86d6476e.

View session

Ready: expected HEAD verified, diff and all supplied reviews inspected, with no actionable findings. Hosted checks passed. Focused severity test and lint()/lintFiles()/JSON smoke checks passed; `vp fmt --check packages/lint` and `git diff --check` passed. Full local tests and type-aware lint were blocked by missing workspace build outputs. No repair changes needed.

Session

Waiting for review checks before the next pass.

Session

Waiting for review checks before the next pass.

Session

Waiting for review checks before the next pass.

Session

Waiting for review checks before the next pass.

Session

Waiting for review checks before the next pass.

Session

Waiting for review checks before the next pass.

Session

Waiting for review checks before the next pass.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes in 7c2a59cd, covering the public diagnostic contract and each integration that consumes or serializes it.

  • Library diagnostics: lint() and lintFiles() now enrich every internal finding with the rule catalog's error or default warn severity after sorting.
  • CLI and ESLint boundaries: JSON output includes severity, text output remains unchanged, and the ESLint worker continues omitting a value that ESLint derives from its own rule configuration.
  • Documentation and tests: README and getting-started usage document the field, with coverage for core errors, core warnings, package rules, and JSON serialization.
  • Verification: pnpm build passed; all 77 focused linter tests passed; vp check packages/lint completed with zero errors and one pre-existing warning.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@pkg-pr-new

pkg-pr-new Bot commented Oct 30, 2026

Copy link
Copy Markdown

Open in StackBlitz

comark-annotate

pnpm add https://pkg.pr.new/comark-annotate@280

comark-badge

pnpm add https://pkg.pr.new/comark-badge@280

comark-cards

pnpm add https://pkg.pr.new/comark-cards@280

comark-carousel

pnpm add https://pkg.pr.new/comark-carousel@280

comark-cast

pnpm add https://pkg.pr.new/comark-cast@280

comark-charts

pnpm add https://pkg.pr.new/comark-charts@280

comark-chat

pnpm add https://pkg.pr.new/comark-chat@280

comark-chips

pnpm add https://pkg.pr.new/comark-chips@280

comark-cjk

pnpm add https://pkg.pr.new/comark-cjk@280

comark-code

pnpm add https://pkg.pr.new/comark-code@280

comark-code-notes

pnpm add https://pkg.pr.new/comark-code-notes@280

comark-colors

pnpm add https://pkg.pr.new/comark-colors@280

comark-comments

pnpm add https://pkg.pr.new/comark-comments@280

comark-critic

pnpm add https://pkg.pr.new/comark-critic@280

comark-deflist

pnpm add https://pkg.pr.new/comark-deflist@280

comark-details

pnpm add https://pkg.pr.new/comark-details@280

comark-diagrams

pnpm add https://pkg.pr.new/comark-diagrams@280

comark-diff

pnpm add https://pkg.pr.new/comark-diff@280

comark-embed

pnpm add https://pkg.pr.new/comark-embed@280

comark-fields

pnpm add https://pkg.pr.new/comark-fields@280

comark-figure

pnpm add https://pkg.pr.new/comark-figure@280

comark-file-tree

pnpm add https://pkg.pr.new/comark-file-tree@280

comark-footnotes

pnpm add https://pkg.pr.new/comark-footnotes@280

comark-github

pnpm add https://pkg.pr.new/comark-github@280

comark-icon

pnpm add https://pkg.pr.new/comark-icon@280

comark-include

pnpm add https://pkg.pr.new/comark-include@280

comark-keys

pnpm add https://pkg.pr.new/comark-keys@280

comark-links

pnpm add https://pkg.pr.new/comark-links@280

comark-linter

pnpm add https://pkg.pr.new/comark-linter@280

comark-magic-move

pnpm add https://pkg.pr.new/comark-magic-move@280

comark-mark

pnpm add https://pkg.pr.new/comark-mark@280

comark-mathml

pnpm add https://pkg.pr.new/comark-mathml@280

comark-media

pnpm add https://pkg.pr.new/comark-media@280

comark-metrics

pnpm add https://pkg.pr.new/comark-metrics@280

comark-outline

pnpm add https://pkg.pr.new/comark-outline@280

comark-properties

pnpm add https://pkg.pr.new/comark-properties@280

comark-qr

pnpm add https://pkg.pr.new/comark-qr@280

comark-quiz

pnpm add https://pkg.pr.new/comark-quiz@280

comark-reading-time

pnpm add https://pkg.pr.new/comark-reading-time@280

comark-sources

pnpm add https://pkg.pr.new/comark-sources@280

comark-steps

pnpm add https://pkg.pr.new/comark-steps@280

comark-table

pnpm add https://pkg.pr.new/comark-table@280

comark-tabs

pnpm add https://pkg.pr.new/comark-tabs@280

comark-tests

pnpm add https://pkg.pr.new/comark-tests@280

comark-ui

pnpm add https://pkg.pr.new/comark-ui@280

comark-xref

pnpm add https://pkg.pr.new/comark-xref@280

comark-zoom

pnpm add https://pkg.pr.new/comark-zoom@280

commit: 7c2a59c

@vite-hub
vite-hub Bot merged commit 0e0b10b into main Oct 30, 2026
5 checks passed
@vite-hub
vite-hub Bot deleted the feat/lint-severities branch October 30, 2026 12:04
@github-actions github-actions Bot mentioned this pull request Oct 30, 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