Skip to content

New Rule: no-empty-static-block #16318

@sosukesuzuki

Description

@sosukesuzuki

Rule details

Restricts empty static blocks

Related ECMAScript feature

https://github.com/tc39/proposal-class-static-block

What type of rule is this?

Enforces a formatting/stylistic preference

Example code

class Foo {
  static {
  }
}

Why should this rule be in the core instead of a plugin?

Static blocks is a core feature of ECMAScript

Participation

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

Additional comments

#15016

no-empty (or no-empty-function?) neither, possibly a new rule.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionfeatureThis change adds a new feature to ESLintruleRelates to ESLint's core rules

    Type

    No type

    Projects

    Status

    Complete

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions