ecmascript 6 - ESLint rule error for import -
i getting below error eslint.
i have added ecmafeatures: { "modules": true }
in .eslintrc
file well.
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:
- in 2.0,
"ecmafeatures": { "modules": true }
has become"parseroptions": { "sourcetype": "module" }
. - 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
Post a Comment