Skip to content

Docs: no-extra-semi doesn't have formatting warning #7307

Closed as not planned
Closed as not planned
@Zamiell

Description

@Zamiell

Before You File a Documentation Request Please Confirm You Have Done The Following...

Suggested Changes

The documentation for the @typescript-eslint/no-extra-parens rule is here:
https://typescript-eslint.io/rules/no-extra-parens/

At the top of the page, we can clearly see the formatting warning:

We strongly recommend you do not use this rule or any other formatting linter rules. Use a separate dedicated formatter instead. See What About Formatting? for more information.

The documentation for the @typescript-eslint/no-extra-semi rule is here:
https://typescript-eslint.io/rules/no-extra-semi/

However, it does have have the warning. This seems like it is a bug, because when we use Prettier, it automatically removes superfluous semicolons, making this rule unnecessary. Thus, I believe that the warning should be shown in the same way that it is for the no-extra-parens rule.

The reason that the warning is not showing is because the meta.type for the rule is equal to suggestion instead of layout. (no-extra-parens has a meta.type of layout, so the warning shows.)

Thus, I recommend that we change the meta.type for the rule to layout.

Affected URL(s)

https://typescript-eslint.io/rules/no-extra-semi/

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationDocumentation ("docs") that needs adding/updatingwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions