Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

Rule idea: enforce enum properties' name format #754

Open
stas-vilchik opened this issue Sep 19, 2018 · 0 comments
Open

Rule idea: enforce enum properties' name format #754

stas-vilchik opened this issue Sep 19, 2018 · 0 comments
Labels
in specification issue is not ready to be implemented new-rule

Comments

@stas-vilchik
Copy link
Contributor

When defining a enum, its properties can be defined using any format, some examples

enum UpperCamelCase {
  FooBar,
  Baz
}

enum CamelCase {
  fooBar,
  Baz
}

enum Caps {
  FOO_BAR,
  BAZ
}

You can imagine even more possible format.

I suggest a rule to enforce a consistent format across the project.

As default value, I suggest to use UpperCamelCase, because it is used in the TypeScript handbook.

@andrea-guarino-sonarsource andrea-guarino-sonarsource added new-rule in specification issue is not ready to be implemented labels Sep 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
in specification issue is not ready to be implemented new-rule
Projects
None yet
Development

No branches or pull requests

2 participants