Skip to content

Rule Change: autofix for no-empty-blocks #476

Description

@k-yle

What rule do you want to change?

no-empty-blocks

What change do you want to make?

Implement a fix xor suggestions

How do you think the change should be implemented?

A new default behavior

Example code

happy to send a PR for this. as far as i know:

  • an empty block is safe to delete. For example a {} ->
  • for @layers, it's safe to remove the curly braces. For example: @layer defaults {} -> @layer defaults
  • other blocks like @media name {} would have no autofix.

if the block contains comments, it would be a suggestion, otherwise it would be a fix.

What does the rule currently do for this code?

no autofix nor suggestions

What will the rule do after it's changed?

has autofix and suggestions

Participation

  • I am willing to submit a pull request to implement this change.

AI acknowledgment

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

Additional comments

­-

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

Status
Ready to Implement

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions