Page MenuHomePhabricator

Update Wikifunctions JS code editor eslint config to allow BigInt
Open, LowPublicBUG 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.