eslint-plugin-import: Cannot read property 'namespace' of undefined

TypeError: Cannot read property ‘namespace’ of undefined from eslint-plugin-import/lib/rules/namespace.js

Getting this error and not exactly sure why. Thanks.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 15 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Did some digging. Turns out it’s because the ES6 behind react-mdl is using object-spread, and ESLint doesn’t handle it by default.

Not sure how to resolve. I probably need to handle somehow in the plugin, short-term. You can use these settings in your eslintrc to resolve for now:

{
  parserOptions: {
    sourceType: 'module',
    ecmaVersion: 6,
    ecmaFeatures: { experimentalObjectRestSpread: true, jsx: true }
  }
}