-
Notifications
You must be signed in to change notification settings - Fork 1.7k
camel_case_types
should cover enums
#58583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@bwilkerson @munificent @jakemac53 @natebosch @lrhn @eernstg: any gut reactions on extending |
I would extend |
Agree. Enums are classes. They are special classes with a lot of restrictions (some of which we plan to remove) and an extra syntax for creating named instances, but they are fundamentally classes and should be named the same way. |
camel_case_types
should cover enums (or we should add camel_case_enums
)camel_case_types
should cover enums
Agreed. Unless we have evidence that changing the rule would break too many users it would be better for users if er extended the existing lint rather than adding a new one. |
Created a PR for this as it seemed like a good first issue... Will revert PR incase I did something wrong and there's some process to be followed for contributing. Thanks! :) |
Awesome. Since this could potentially block an internal Dart SDK roll (if there are violations to address), we'll have to do some testing before landing. I'l look into that. Thanks! |
As per the style guide:
https://dart.dev/guides/language/effective-dart/style#do-name-types-using-uppercamelcase
Would be nice to have this in place in time for enhanced enums (#3090).
Alternatively, we could consider a discrete lint
camel_case_enums
(in keeping withcamel_case_extensions
).The text was updated successfully, but these errors were encountered: