Page MenuHomePhabricator

Update Wikifunctions JS code editor eslint config to allow BigInt
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
There is a warning in the gutter:

'BigInt' is only available in ES11 (use 'esversion: 11').

image.png (246×893 px, 36 KB)

What should have happened instead?:
No warning. BigInt is the underlying JS type of natural numbers and evidently supported already.

Event Timeline

Strangely enough, despite its wording, the warning only happens for BigInt literals (e.g. 1n), not calls to the actual BigInt type (e.g. BigInt( 1 )). But I don’t think we should use the more verbose BigInt( 1 ) form just to appease a misconfigured eslint.

Change 1010643 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] [WIP] CodeEditor: Configure JavaScript in esversion:11 / esnext mode

https://gerrit.wikimedia.org/r/1010643

Mcastro moved this task from To Triage to Backlog on the Abstract Wikipedia team board.
Jdforrester-WMF subscribed.

This has seemingly fixed itself – either our other fixes to this component to enable/disable as needed have incidentally fixed it, though I can't see how, or the upgrade of Ace to 1.32.7 in ef7d07b2e626a62a9c823eac17d078aa399daae0 changed the default esversion mode?

Change #1010643 abandoned by Jforrester:

[mediawiki/extensions/WikiLambda@master] [WIP] CodeEditor: Configure JavaScript in esversion:11 / esnext mode

Reason:

Seemingly not needed?

https://gerrit.wikimedia.org/r/1010643