ecmascript 6 - ESLint rule error for import -


i getting below error eslint.

i have added ecmafeatures: { "modules": true } in .eslintrc file well.

enter image description here

because you're getting message, looks you've upgraded eslint 2.0, great! can see 2 changes you'll make configuration, though if else comes up, it's covered under 2.0 migration guide:

  1. in 2.0, "ecmafeatures": { "modules": true } has become "parseroptions": { "sourcetype": "module" }.
  2. we replaced space-after-keywords new rule, keyword-spacing, introduced in 1 of 2.0 betas. if using "space-after-keywords: 2, can change "keyword-spacing": 2 now.

putting together, .eslintrc eslint 2.0 should include this:

{     "parseroptions": {         "sourcetype": "module"     },     "env": {         "es6": true     },     "rules": {         "keyword-spacing": 2     } } 

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -