Skip to content

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

Merged
Pixel998 merged 2 commits into
eslint:mainfrom
k-yle:kh/autofix-empty-blocks
Aug 4, 2026
Merged

feat: add suggestions to no-empty-blocks#479
Pixel998 merged 2 commits 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
Contributor

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
Comment thread src/rules/no-empty-blocks.js Outdated
Comment thread src/rules/no-empty-blocks.js Outdated
@github-actions

Copy link
Copy Markdown
Contributor

Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update.

@github-actions github-actions Bot added the Stale label Jul 25, 2026
@k-yle
k-yle force-pushed the kh/autofix-empty-blocks branch from 9c140f5 to d70549d Compare July 27, 2026 12:24
@github-actions github-actions Bot removed the Stale label Jul 27, 2026

@DMartens DMartens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes LGTM, thanks again. Leaving open for @Pixel998.

@Pixel998

Pixel998 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

LGTM, thanks!

@Pixel998
Pixel998 merged commit aa750cc into eslint:main Aug 4, 2026
38 checks passed
@github-project-automation github-project-automation Bot moved this from Second Review Needed to Complete in Triage Aug 4, 2026
@k-yle
k-yle deleted the kh/autofix-empty-blocks branch August 5, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

Rule Change: autofix for no-empty-blocks

3 participants