./mach eslint no longer applies the `curly` rule by default
Categories
(Developer Infrastructure :: Lint and Formatting, defect, P2)
Tracking
(firefox-esr128 unaffected, firefox132 wontfix, firefox133 wontfix, firefox134 fixed)
Tracking | Status | |
---|---|---|
firefox-esr128 | --- | unaffected |
firefox132 | --- | wontfix |
firefox133 | --- | wontfix |
firefox134 | --- | fixed |
People
(Reporter: nordzilla, Assigned: standard8)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
Description
I noticed recently that curly braces are not being enforced by ESLint in tree.
I used git bisect
and I believe that Bug 1920531 regressed this behavior.
Steps to reproduce
- Create a test file
example.js
in the root of themozilla-unified
tree.
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
let x = 0;
if (x === 0) true;
- Run
./mach eslint --fix example.js
Expected Behavior
✖ 0 problems (0 errors, 0 warnings, 2 fixed)
--- a/before
+++ b/after
@@ -3,5 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
let x = 0;
-if (x === 0) true;
+if (x === 0) {
+ true;
+}
Actual Behavior
✖ 0 problems (0 errors, 0 warnings, 0 fixed)
- Run
./mach eslint --fix example.js --rule "curly:error"
.
The file is fixed as expected when manually adding--rule "curly:error"
.
Reporter | ||
Updated•3 months ago
|
Comment 1•3 months ago
|
||
Set release status flags based on info from the regressing bug 1920531
:standard8, since you are the author of the regressor, bug 1920531, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Updated•3 months ago
|
Assignee | ||
Updated•3 months ago
|
Assignee | ||
Comment 2•3 months ago
|
||
This was accidentally disabled in bug 1920531 with the re-organisation of how eslint-plugin-mozilla worked.
The rule needs to be (re)enabled after eslint-config-prettier is applied, as eslint-config-prettier turns it off by default.
Assignee | ||
Updated•3 months ago
|
Comment 4•3 months ago
|
||
bugherder |
Comment 5•3 months ago
|
||
The patch landed in nightly and beta is affected.
:standard8, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox133
towontfix
.
For more information, please visit BugBot documentation.
Assignee | ||
Updated•3 months ago
|
Description
•