"Use of future reserved word in strict mode" false positive with eslint-env es6
See original GitHub issueESLint version: 0.17.1
(and 67936e0d571c613ac54f4097b4235e6411af0b79 gives the same results)
foo.js
:
/*eslint-env es6 */
let x = 42;
.eslintrc
:
{
"ecmaFeatures": { "modules": true }
}
The false positive:
$ ./node_modules/.bin/eslint foo.js
foo.js
2:1 error Use of future reserved word in strict mode
✖ 1 problem (1 error, 0 warnings)
Issue Analytics
- State:
- Created 8 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Use of future reserved word in strict mode - Stack Overflow
The use of let is what is causing that error inside of strict mode. Change it to var . Sounds like you're in...
Read more >Language Options - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >how to add es6 in sapui5? - SAP Community
Hi, I wish to add ES6 functionality like let while implementing client side functionality...i am getting a error("Use of future reserved word in...
Read more >@babel/plugin-transform-reserved-words - Package Manager
Ensure that no reserved words are used. babel-plugin. readme. babel. The compiler for writing next generation JavaScript. Gitpod ready ...
Read more >CoffeeScript
The biggest change in CoffeeScript 2 is that now the CoffeeScript compiler produces modern JavaScript syntax (ES6, or ES2015 and later).
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
Most likely we’re not apply
ecmaFeatures
for inline environments correctly. As a workaround, you can try addingenv: { es6: true }
to your config file.@ilyavolodin we can’t leave this. Either we remove the es6 environment or we figure out a way to make this work.
We could, in theory, just search for
/*eslint-env
and see if there’ses6:true
before parsing.