Closed Bug 1487246 Opened 2 years ago Closed 2 years ago

Enable ESLint rule no-sequences

Categories

(Firefox Build System :: Lint and Formatting, enhancement)

enhancement
Not set
normal

Tracking

(firefox63 fixed)

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: bgrins, Assigned: mossop)

Details

Attachments

(3 files)

https://eslint.org/docs/rules/no-sequences

There was a typo in an in-development test that would have gotten caught by this rule and saved some time.

```
await synthesizeKey(LEFT, { shiftKey: true }), "\uF702";
```

Which should have been:

```
await synthesizeKey(LEFT, { shiftKey: true }, "\uF702");
```

https://hg.mozilla.org/try/rev/ed71871c108665d1a07aa46caa3a850eae0f2e54#l2.61
Component: General → Lint and Formatting
Product: Toolkit → Firefox Build System
I ran with this enabled locally and it only flagged 32 errors over the entire tree, seems like we could enable this easily.
Mostly just mistyped semicolons, only two or three legitimate uses (which I think look clearer removed anyway) and a few actual bugs where folks mistypes "is" as "if".

https://treeherder.mozilla.org/#/jobs?repo=try&revision=8022649ccbfb5ce2bb38cc3192d59f9b90f5d02a
Assignee: nobody → dtownsend
Two cases were hiding permanently failing tests. I've commented those out and
filed bug 1487431.
Yes, great idea. Anything that helps with finding errors before running any code has my vote.
Comment on attachment 9005226 [details]
Bug 1487246: Remove uses of comma sequences in linted code. r=Standard8

Mark Banner (:standard8) has approved the revision.
Attachment #9005226 - Flags: review+
Comment on attachment 9005227 [details]
Bug 1487246: Enable the eslint no-sequences rule. r=Standard8

Mark Banner (:standard8) has approved the revision.
Attachment #9005227 - Flags: review+
Pushed by dtownsend@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2897eaa81db8
Remove uses of comma sequences in linted code. r=Standard8
https://hg.mozilla.org/integration/mozilla-inbound/rev/05e07c98cc36
Enable the eslint no-sequences rule. r=Standard8
https://hg.mozilla.org/mozilla-central/rev/2897eaa81db8
https://hg.mozilla.org/mozilla-central/rev/05e07c98cc36
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.