eslint / js

Monorepo for the JS language tools.
BSD 2-Clause "Simplified" License
2.29k stars 196 forks source link

Not ES2020 #605

Closed weaweawe01 closed 6 months ago

weaweawe01 commented 6 months ago

espree.tokenize("alert(1n)") Uncaught [SyntaxError: Identifier directly after number ] { index: 7, lineNumber: 1, column: 8 }

aladdin-add commented 6 months ago

bigint is supported, you need to pass the ecmaVersion >= 2020 or "latest".

espree.tokenize("1n", {ecmaVersion: 2020});