Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Open
Description
Before You File a Proposal Please Confirm You Have Done The Following...
- I havesearched for related issues and found none that match my proposal.
- I haveread the FAQ and my problem is not listed.
Description
Code like this fails with the default option:
constenumSearchItemType{Page=0,ID=1,}constenumSearchIndexType{Title=1,Heading=2,Text=3,Image=4,Card=5,Doc=6,}
However, I think using PascalCase for enum member should be the default option, as this is the default syntax in TypeScript official docs, blogs and examples.
E.g.:
- https://www.typescriptlang.org/docs/handbook/enums.html
- https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/#all-enums-are-union-enums
Other things to report and could be a feature request
The problem is affecting me because we are not providing a keyword to enable the default naming convention and "make some tweaks over it". I.E.: In this case, I can not simply add the green line below, instead I have to redeclare the whole "option". That is not convinient for me accross projects.
Impacted Configurations
// the default config is similar to ESLint's camelcase rule but more strictconst defaultOptions: Options = [ { selector: 'default', format: ['camelCase'], leadingUnderscore: 'allow', trailingUnderscore: 'allow', }, { selector: 'import', format: ['camelCase', 'PascalCase'], }, { selector: 'variable', format: ['camelCase', 'UPPER_CASE'], leadingUnderscore: 'allow', trailingUnderscore: 'allow', }, { selector: 'typeLike', format: ['PascalCase'], },+ {+ selector: 'enumMember',+ format: ['PascalCase'],+ },];
Additional Info
No response