Sathish Posted on Apr 9, 2018 • Edited on Sep 9, 2024 How to set ecmaScript version in .eslintrc.yml? #help Top comments (2) Subscribe Collapse Expand rhymes rhymes rhymes Follow Such software as dreams are made on. I mostly rant about performance, unnecessary complexity, privacy and data collection. Joined Feb 2, 2017 • Apr 9 '18 • Edited on Apr 9 • Edited Dropdown menu Copy link Hide Something like this? This is for ES6 { "extends": "airbnb-base", "parserOptions": { "ecmaVersion": 6, "ecmaFeatures": { "impliedStrict": true } }, "env": { "browser": true, "es6": true } } This is for ES5 { "extends": "eslint:recommended", "parserOptions": { "ecmaVersion": 5, "ecmaFeatures": { "impliedStrict": true } }, "env": { "browser": true } } I have an old project with mixed ES5 and ES6 files and they are linted by different .eslintrc.json, with something like this: eslint --fix --color --config .eslintrc.es5.json Collapse Expand Sathish Sathish Sathish Follow Lead Engineer, Presidio. Email [email protected] Location India Pronouns He/Him Work Lead Engineer @ PRESIDIO Joined May 31, 2017 • Apr 10 '18 Dropdown menu Copy link Hide The main problem is that the eslint config file is a yml file which is autocreated by yeoman. I couldn't use async await with that config. Code of Conduct • Report abuse For further actions, you may consider blocking this person and/or reporting abuse
Top comments (2)
Something like this?
This is for ES6
This is for ES5
I have an old project with mixed ES5 and ES6 files and they are linted by different
.eslintrc.json
, with something like this:The main problem is that the eslint config file is a yml file which is autocreated by yeoman. I couldn't use async await with that config.