Skip to content

feat: add suggestions to no-empty-blocks#479

Open
k-yle wants to merge 1 commit into
eslint:mainfrom
k-yle:kh/autofix-empty-blocks
Open

feat: add suggestions to no-empty-blocks#479
k-yle wants to merge 1 commit into
eslint:mainfrom
k-yle:kh/autofix-empty-blocks

Conversation

@k-yle

@k-yle k-yle commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Prerequisites checklist

AI acknowledgment

  • I did not use AI to generate this PR.
  • (If the above is not checked) I have reviewed the AI-generated content before submitting.

What is the purpose of this pull request?

Add sugggestions to no-empty-blocks. There are two different cases:

  • @layer name {} becomes @layer name
  • all other empty blocks like a {} become . This included unnamed layers such as @layer {}.

What changes did you make? (Give an overview)

Related Issues

Closes #476

Is there anything you'd like reviewers to focus on?

Comment thread src/rules/no-empty-blocks.js Outdated
Comment thread src/rules/no-empty-blocks.js Outdated
@DMartens DMartens moved this from Needs Triage to Second Review Needed in Triage Jun 28, 2026
@DMartens

Copy link
Copy Markdown

Thank you for the PR. Just found two small refactorings using more appropriate methods.
Also checked and tried ways to create a parse error / changing AST after removal but could not find one.
Would like the second reviewer to focus on this.

@k-yle k-yle force-pushed the kh/autofix-empty-blocks branch from 7790a62 to a91126c Compare June 29, 2026 12:38
Comment thread src/rules/no-empty-blocks.js Outdated
Comment thread src/rules/no-empty-blocks.js Outdated
@k-yle k-yle force-pushed the kh/autofix-empty-blocks branch from a91126c to 9c140f5 Compare July 8, 2026 11:27
@k-yle k-yle requested a review from Pixel998 July 8, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Second Review Needed

Development

Successfully merging this pull request may close these issues.

Rule Change: autofix for no-empty-blocks

3 participants