Search code examples
babeljsatom-editoreslint

Atom & eslint update : ImportDeclaration should appear when the mode is ES6 and in the module context


I updated all my packages and now I use eslint 2.4.0 and babel-eslint 5.0.0.

But now, I have got an error on eslint check :

AssertionError: ImportDeclaration should appear when the mode is ES6 and in the module context.

and my .eslintrc is :

{
  "ecmaFeatures": {
    "jsx": true,
    "modules": true
  },
  "env": {
    "browser": true,
    "node": true
  },
  "parser": "babel-eslint",
  "rules": {
    "quotes": [2, "single"],
    "strict": [2, "never"],
    "react/jsx-uses-react": 2,
    "react/jsx-uses-vars": 2,
    "react/react-in-jsx-scope": 2
  },
  "plugins": [
    "react"
  ]
}

There is an incompatibility ? Breaking change ?

Thanks


Solution

  • Edit:

    The bug is now fixed. You can safely use "eslint": "^2.4.0".


    There is a know issue about that (here too).

    I suggest you to simply use the version 2.2.x for the moment.