Alias the es6 env to es2015
See original GitHub issueThe version of ESLint you are using. 3.4.0
The problem you want to solve.
ESLint 3.4.0 introduced new preferred numbers for the ecmaVersion
property, e.g. 2015 instead od 6. The change is not reflected in the es6
environment name. My current example config is now inconsistent:
module.exports = {
parserOptions: {
ecmaVersion: 2016,
},
env: {
es6: true,
},
rules: { /* ... */ },
};
Your take on the correct solution to problem.
An alias env called es2015
should be created and preferred to the old es6
one.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:16 (16 by maintainers)
Top Results From Across the Web
ES2015 aliases for ES6? · Issue #6750 · eslint/eslint - GitHub
Basically, an ability to specify ecmaVersion: 2015 that would behave just like ecmaVersion: 6 without deprecating the value 6 . And an es2015...
Read more >ES6 Modules (ES2015) - Import and Export | egghead.io
ES6 (ES2015) introduces a standardized module format to Javascript. We'll take a look at the various forms of defining and importing modules.
Read more >Jest cannot locate @babel/code-frame when trying to use ...
When I imported for example example.js , which has an alias'd import , Jest would throw an error, "cannot resolve module '@/widgets/widget'.
Read more >babel/preset-env
babel /preset-env` is a smart preset that allows you to use the latest JavaScript without needing to micromanage which syntax transforms (and optionally, ......
Read more >ES6 Tutorial - #10 Modules (import & export) - YouTube
14K views 4 years ago ES6 / ES2015 Tutorial ... named imports 7:10 Inline export 8:22 Export with an alias 10:20 Import with...
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
There’s nothing wrong with the ability to write
Then the user will just get the error “Both
es6
andes2015
env options were set to conflicting values. Remove one to continue.”Based on discussion in the 2016-09-01 TSC meeting, we believe supporting both
es6
andes2015
in parallel or renaminges6
toes2015
would be more confusing than keeping the name as-is.es6
will remain, and we will use year-based naming starting with the 2017 edition. (ES7/ES2016 introduced no new globals, so it doesn’t have its own environment.)