8000 [member-ordering] Add ability to sort enums · Issue #4859 · typescript-eslint/typescript-eslint · GitHub
[go: up one dir, main page]

Skip to content
[member-ordering] Add ability to sort enums #4859
Closed as not planned
Closed as not planned
@Zamiell

Description

@Zamiell

Hello, and thanks for your excellent linter.

Currently, the @typescript-eslint/member-ordering rule supports sorting classes, interfaces, and type literals.

But it doesn't support enums. Can someone please add enums? It seems like it would be a super-quick addition.

For example, with the following ESLint configuration:

  rules: {
    "@typescript-eslint/member-ordering": [
      "warn",
      {
        enums: {
          order: "alphabetically",
        },
      },
    ],
  }

ESLint should warn me that the following enum is not in alphabetical order:

enum Fruit {
  Banana,
  Apple,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issueenhancement: plugin rule optionNew rule option for an existing eslint-plugin rulelocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0