Skip to content

feat(rules): add auto-fix support to multiple rules#30

Merged
d3lm merged 2 commits into
mainfrom
feat/all-rules-autofixable
Jul 17, 2026
Merged

feat(rules): add auto-fix support to multiple rules#30
d3lm merged 2 commits into
mainfrom
feat/all-rules-autofixable

Conversation

@Tahul

@Tahul Tahul commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Adds auto-fix support to the four remaining rules that previously only reported problems, so violations can now be resolved with eslint --fix:

  • block-scope-case: wraps case consequents in braces
  • catch-error-name: renames the catch parameter and all its references; bails out if the expected name is already in scope to avoid shadowing
  • comment-syntax: fixes spacing, capitalization, list items, paragraph endings, and JSDoc formatting
  • lines-around-comment: inserts missing blank lines

No changes to what the rules report — only fixers were added, with tests covering the new fix output.

Add fixers to block-scope-case, catch-error-name, comment-syntax,
and lines-around-comment rules:

- block-scope-case: wrap case consequent in braces
- catch-error-name: rename the catch parameter and all its
  references, bailing out when the expected name is already used
- comment-syntax: fix line/block comment spacing, capitalization,
  list items, paragraph endings, and JSDoc formatting
- lines-around-comment: apply fix for missing blank lines

Add test coverage for the new fix behavior.
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@d3lm d3lm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you!

@d3lm
d3lm merged commit f2eaf15 into main Jul 17, 2026
2 checks passed
@d3lm
d3lm deleted the feat/all-rules-autofixable branch July 17, 2026 08:24
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