accept `underscore` in enum declaration
Lint Name
camelcase
Code Snippet
enum MyEnum {
Idenfitier1,
Idenfitier_2,
}
Expected Result
No warning
Actual Result
Identifier 'Identifier_2' is not in camel case.
Additional Info
(those are generated from a graphql schema)
Version
deno 1.11.0 (release, x86_64-apple-darwin) v8 9.1.269.35 typescript 4.3.2
Currently, camelcase rule allows PascalCase or CAPITAL_SNAKE_CASE in enum variants, so Identifier_2 in your example should be Identifier2 or IDENTIFIER_2.
Is it impossible to change your GraphQL schema to follow this naming convention for some reason? If it's possible, please consider changing the schema. Otherwise, we have to discuss whether we should allow PascalCase to include underscores. (Personally I'm in favor of it though)
Or, of course, it is reasonable to suppress the linter by adding // deno-lint-ignore directive in your situations. In general, linting on auto-generated code is a bit meaningless.
@magurotuna made a relevant point.
@cvng do you agree? Can we close this issue?
@magurotuna made a relevant point.
@cvng do you agree? Can we close this issue?
Sure, this is no longer an issue for us, thanks for asking