Enable ESLint rule no-sequences

RESOLVED FIXED in Firefox 63

Status

enhancement
RESOLVED FIXED
10 months ago
9 months ago

People

(Reporter: bgrins, Assigned: mossop)

Tracking

unspecified
mozilla63

Firefox Tracking Flags

(firefox63 fixed)

Details

Attachments

(3 attachments)

Reporter

Description

10 months ago
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
Assignee

Updated

10 months ago
Component: General → Lint and Formatting
Product: Toolkit → Firefox Build System
Assignee

Comment 1

10 months ago
I ran with this enabled locally and it only flagged 32 errors over the entire tree, seems like we could enable this easily.
Assignee

Comment 2

10 months ago
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

Updated

10 months ago
Assignee: nobody → dtownsend
Assignee

Comment 3

10 months ago
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+

Comment 8

10 months ago
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: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.