Closed Bug 1540982 Opened 5 years ago Closed 5 years ago

Upgrade to ESLint 6.2.0 or later (BigInt support)

Categories

(Developer Infrastructure :: Lint and Formatting, defect, P2)

defect

Tracking

(firefox70 fixed)

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: wingo, Assigned: standard8)

References

Details

Attachments

(1 file)

Bug 1456569 includes some self-hosted JS that works on bigint values. Bigints are a new kind of primitive value and thus have their own typeof.

Unfortunately the patch for bug 1456569 was backed out because the linter didn't think that typeof x == 'bigint' was a valid comparison: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=237483600&repo=autoland&lineNumber=281

The linter needs updating.

Unblocking bug because // eslint-disable workarounds are available.

No longer blocks: 1456569
See Also: → 1456569

valid-typeof is a built-in ESLint rule. According to ESLint's documentation, ESLint only officially supports the latest standard. As BigInt is stage 3 we're not going to get this until it hits stage 4 / completion.

As mentioned in comment 1, using // eslint-disable-next-line valid-typeof or equivalent is the easiest thing to do for now, and we'll update once it gets to stage 4.

Priority: -- → P5

Just FYI, the only thing remaining for bigint to make stage 4 is shipping in SM, so I think it's reasonable for SM to make changes that assume bigint is stage 4 already. Good that there are workarounds though.

Good news is that ESLint 6.2.0 is out which has support for BigInt, and dynamic imports. Bad news is that there's a regression when used with babel-eslint that currently stops us from upgrading to it.

I'm keeping an active watch, once it gets resolved I'll do the upgrade.

Assignee: nobody → standard8
Status: NEW → ASSIGNED
Priority: P5 → P2
Summary: Add "bigint" as valid typeof comparison, for js lint → Upgrade to ESLint 6.2.0 or later (BigInt support)
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/639ee379247d
Upgrade to ESLint 6.2.2 and switch to ECMA version 11 (BigInt support, Dynamic imports). r=mossop
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Iteration: --- → 70.4 - Aug 19 - Sep 1
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: