Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'BigInt' is not defined. #1436

Closed
LinusU opened this issue Oct 7, 2019 · 1 comment · Fixed by standard/eslint-config-standard#156
Closed

'BigInt' is not defined. #1436

LinusU opened this issue Oct 7, 2019 · 1 comment · Fixed by standard/eslint-config-standard#156

Comments

@LinusU
Copy link
Member

LinusU commented Oct 7, 2019

What version of this package are you using?

14.3.1

What operating system, Node.js, and npm version?

macOS 10.14.6
Node.js 12.10.0
npm 6.11.3

What happened?

I had the following code:

buffer.writeBigUInt64LE(BigInt(createdAt.getTime()), 0)

Got the following error:

'BigInt' is not defined.

This was mentioned as fixed in 14.1.0 here: #1378 (comment)

What did you expect to happen?

No error

Are you willing to submit a pull request to fix this bug?

Yes

alFReD-NSH added a commit to alFReD-NSH/eslint-config-standard that referenced this issue Oct 15, 2019
Fixes standard/standard#1436

The ecmaVersion in parserOptions is only for setting syntax support.

From the docs: https://eslint.org/docs/user-guide/configuring

> supporting ES6 syntax is not the same as supporting new ES6 globals

Setting the es2020 env will actually set the globals:

> adds all ECMAScript 2020 globals and automatically sets the ecmaVersion parser option to 11.
@feross
Copy link
Member

feross commented Oct 21, 2020

This will be fixed in standard v15.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants