Remove ESLint rule mozilla/consistent-if-bracing as curly already enforces it
Categories
(Developer Infrastructure :: Lint and Formatting, task, P3)
Tracking
(firefox134 fixed)
| Tracking | Status | |
|---|---|---|
| firefox134 | --- | fixed |
People
(Reporter: standard8, Assigned: standard8)
References
Details
Attachments
(2 files)
In bug 1927798 we are fixing a regression where the curly rule was disabled and are re-enabling it. I remembered about the mozilla/consistent-if-bracing rule whilst I was there, and realised we don't need it any more because curly is set to all, so we will always have braces. The rule was originally enabled in bug 1528751 which landed a while before we enabled the curly rule in bug 1558517.
Whilst here, I also noticed a performance improvement in determining the globals - we are parsing the AST unnecessarily in the case where we are not in the global scope. This only speeds up ESLint by a second over a whole run, but I figured as it is an easy change, we might as well take it.
| Assignee | ||
Comment 1•1 year ago
|
||
There's no need to get the AST source if we are not in the global scope.
| Assignee | ||
Comment 2•1 year ago
|
||
Comment 4•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/80270933ffc6
https://hg.mozilla.org/mozilla-central/rev/fa800470075c
Description
•