"'BigInt' is not defined" for build-in BigInt
See original GitHub issueMy environment
- ESLint Version: 5.15.2 (I just updated from 4.19.1 when I was attempting to void the issue)
- Node Version: v10.15.1
- npm Version: 6.4.1
What parser (default, Babel-ESLint, etc.) are you using? standard
Please show your full configuration: I’m using standardjs
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
let totalPrice = BigInt(0)
totalPrice += BigInt(123)
f (BigInt(totalPrice) === BigInt(0)) console.log('PAID')
standard --fix
What did you expect to happen? BigInt should be recognized as build-in object and there should not be “no-undef” error.
What actually happened? Please include the actual, raw output from ESLint. “‘BigInt’ is not defined.” error is thrown.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:11 (6 by maintainers)
Top Results From Across the Web
ReferenceError: BigInt is not defined Asar Electron Nodejs
This error sounds like you don't have a new enough nodejs version as BigInt was added in v10.4 and the error is coming...
Read more >BigInt not defined after changing eslist config env variables
BigInt not defined after changing eslist config env variables · 1)Added the following according to tutorial in hello_frontend/package.json file
Read more >ReferenceError: BigInt is not defined : r/node - Reddit
I have downloaded an npm package which uses BigInt inside it and I get following error : ReferenceError: BigInt is not defined.
Read more >BigInt - JavaScript - MDN Web Docs
BigInt values are similar to Number values in some ways, but also differ in a few key matters: A BigInt value cannot be...
Read more >big-integer - npm
If you are using node, you can install BigInteger with npm. npm install big-integer. Then you can include it in your code: var...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
i added
to eslint config
To enable the
BigInt
global you can add a comment to your code:To avoid needing to do this, you could ask the
standard
maintainers to enableBigInt
in their configuration.