Closed
Conversation
Contributor
There was a problem hiding this comment.
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 |
e70b61f to
15ebcb4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.