-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix(enums-eslint): Enum Rule for ESLint #14650
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #14650 +/- ##
=======================================
Coverage 36.34% 36.34%
=======================================
Files 3190 3190
Lines 92150 92150
Branches 16524 16524
=======================================
Hits 33491 33491
Misses 56268 56268
Partials 2391 2391 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Great job, no security vulnerabilities found in this Pull Request |
Do we have clear plans on resolving this in the near future? If not I'd be more open to changing this to error and add ignore statements to all the existing. Warnings tends to be ignored even with all the noise they produce, just look at the server project. |
… warning on enums.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have the same concern as @Hinton: if all teams don't immediately start fixing these warnings we should add ignore ignore
statements to all the existing code. Otherwise any new warning about usage of enum
will completely drown in all of the other existing warnings
Co-authored-by: Andreas Coroiu <[email protected]>
@Hinton @coroiu see decision by @withinfocus here. If both of you feel strongly about the proposed approach regarding erroring all of them and adding an ignore to the existing ones then let's have that conversation here in this pr. |
Yes I feel strongly about it since ignoring existing occurrences is the established standard. We have a long track history of ignoring warnings either explicitly or implicitly.
|
I agree that we've gone the ignore route for a while now and I think it has proven itself to work. It immediately changes how we write code so that we don't continue writing using deprecated syntax and it allows reviewers to instantly identify when someone might try to "sneak something in. An If we make the rule a "warning" then we'll be waiting a long time for every single team to fix their existing instances (and maybe some new ones) and someone will have to actively follow up on it so we don't forget to flip the switch to error. We'll also be spamming the console but that's probably the smallest issue. Here are some of the previous PRs where we've followed this convention (admittedly most are by you @Hinton so it probably shouldn't come as a surprise to anyone that you favor this approach 😄): |
…hanged usages of firefox to private and moved the usages to the preferred public method and removed the deprecations.
Oh cool! Thank you for filling me in on some of the traditional approaches we've taken and why. I'll update to conform and leave a note in the other thread for Matt to visit this conversation just in case he wants to know what's going on 👍 |
…disable rules for all other places.
|
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-20454
📔 Objective
Added enums in the warnings for eslint via using a new eslint plugin. Set to warning right now and can be bumped later to error.
📸 Screenshots
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes