Skip to content

chore: support warn#68

Closed
hardfist wants to merge 1 commit intomainfrom
yj/support-warn
Closed

chore: support warn#68
hardfist wants to merge 1 commit intomainfrom
yj/support-warn

Conversation

@hardfist
Copy link
Copy Markdown
Contributor

No description provided.

@hardfist hardfist requested a review from Copilot July 26, 2025 02:21
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

This PR adds support for warning-level diagnostics to the Rslint linter. The change introduces a three-level severity system (off, warn, error) that allows rules to be configured with different diagnostic levels, providing more granular control over linting behavior.

  • Added diagnostic levels (off, warn, error) with proper parsing and string conversion
  • Updated rule configuration to support level-based rule settings with multiple syntax formats
  • Enhanced CLI output to distinguish between errors and warnings with appropriate coloring and counts

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
internal/rule/rule.go Defines DiagnosticLevel enum and parsing functions for severity levels
internal/linter/linter.go Updates linter to skip "off" rules and propagate diagnostic levels
internal/config/rule_registry.go Modifies rule registry to handle configured rules with diagnostic levels
cmd/rslint/cmd.go Enhances CLI output to display warning vs error counts and appropriate coloring
cmd/rslint/lsp.go Updates LSP mode to use new rule configuration structure
cmd/rslint/api.go Updates API handler to include severity in diagnostic output
internal/rule_tester/rule_tester.go Updates rule tester to use new ConfiguredRule structure
rslint.jsonc Adds example configurations showing different rule level syntax formats
rslint.json Changes all TypeScript rules from "off" to "warn" level

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.

2 participants