Skip to content

no-empty-blocks rule #1042

@Dimava

Description

@Dimava

Motivation

  1. I'm moving some JS code with types described as JSDoc into TS
    All those param types are being removed and become empty
    Making all the functions to have descriptions is not planned.
    Thus I need a way to cleanup empty code blocks.
  2. I'm working on https://github.com/Shinigami92/eslint-define-config
    Code generation sometimes causes empty JSDoc blocks to appear here and there.
    Some non-needed blocks like @minItems can also appear.

I am looking for an easy and straigntforward way to remove the blocks I don't need
First step would be removing unwanted tags by autofixer
Second step would be removing blocks which became empty by autofixer

Current behavior

The documentation is too long to read it completely
Nothing searchable there clearly states that it can be used to remove lines or blocks, other then builtin autofixers

Desired behavior

  • A rule that says that it bans empty blocks in its name
  • A rule that says that it bans certain tags in its name

Alternatives considered

I have spend an hour reading documentation, understood nothing on the case

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions