inconsistent naming for enums
See original GitHub issueDescribe the bug with version 0.16 the uppercase issue with enums is fixed. but there is something with the name of the enum itself that isn’t consistent anymore.
this gets generated for the enum:
export enum CIState {
NONE = "NONE",
IN_DEVELOPMENT = "IN_DEVELOPMENT",
IN_USE = "IN_USE",
IN_REMOVAL = "IN_REMOVAL",
REMOVED = "REMOVED"
}
and this is the type which references the enum. you’ll notice that the enum CIState has a lowercase I in here. this breaks the reference as it is case sensitive. the actual graphql schema has an uppercase I (CIState as in the enum definition)
export type Desired = {
...
state: Maybe<CiState>;
};
To Reproduce don’t really have a repro available as the source is cloud source.
Expected behavior use the name of the graphql schema for naming in all cases.
Schema/Documents can’t porovide the schema
Environment:
- OS: WIndows 10
- Codegen: 0.16.0
- Node: 8.9.1
Additional context 0.15.x used CiState (lower case I) in all places
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Inconsistent Enum Casting Results in C# - Stack Overflow
The documentation for Enum.ToString() explicitly states: If multiple enumeration members have the same underlying value and you attempt to ...
Read more >Inconsistent enumeration declaration (name mismatch)
An inconsistent data declaration was found. In this case, the same name was declared as an enumeration in two compilation units, but the...
Read more >Official Naming Convention for Enums - Google Groups
Enums are types, so they should be named using UpperCamelCase like classes. The enum values are constants, so they should be named using...
Read more >Naming style | ReSharper Documentation - JetBrains
Press Alt+Enter on a highlighted symbol with inconsistent naming, then choose Inspection 'Inconsistent Naming ' | Change settings for naming rule ...
Read more >Epic C++ Coding Standard for Unreal Engine
For example, FSkin is a type name, and Skin is an instance of a FSkin . ... Enum classes should always be used...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@SoyYoRafa you can ask for no naming changes like this:
yes, that works now. thanks!