Skip to content

TypeError: Cannot read property 'forEach' of null #717

Closed
@brunolemos

Description

Cannot read property 'forEach' of null
TypeError: Cannot read property 'forEach' of null
    at dependencies.forEach.dep (/node_modules/eslint-plugin-import/lib/ExportMap.js:182:43)
    at Map.forEach (native)
    at ExportMap.forEach (/node_modules/eslint-plugin-import/lib/ExportMap.js:182:23)
    at EventEmitter.ExportAllDeclaration (/node_modules/eslint-plugin-import/lib/rules/export.js:62:23)
    at emitOne (events.js:101:20)
    at EventEmitter.emit (events.js:188:7)
    at NodeEventGenerator.enterNode (/node_modules/eslint/lib/util/node-event-generator.js:39:22)
    at CodePathAnalyzer.enterNode (/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:607:23)
    at CommentEventGenerator.enterNode (/node_modules/eslint/lib/util/comment-event-generator.js:97:23)
    at Controller.enter (/node_modules/eslint/lib/eslint.js:928:36)

I'm using airbnb rules on WebStorm editor.
My .eslintrc is the following:

{
  "parser": "babel-eslint",
  "extends": "airbnb",
  "env": {
    "es6": true,
    "jest": true
  },
  "plugins": [
    "babel",
    "flowtype",
    "import",
    "react",
    "react-native"
  ],
  "parserOptions": {
    "ecmaFeatures": {
      "jsx": true
    },
    "sourceType": "module"
  },
  "settings": {
    "import/extensions": [".js", ".jsx", ".android.js", ".ios.js"]
  },
  "rules": {
    "react/jsx-filename-extension": ["off"],
    "react/prefer-stateless-function": ["error", {
      "ignorePureComponents": true
    }],
    "no-case-declarations": ["off"],
    "no-underscore-dangle": ["off"],
    "no-nested-ternary": ["off"],
    "arrow-parens": 0,
    "babel/arrow-parens": 1,
    "react-native/no-unused-styles": 2,
    "react-native/split-platform-components": 2,
    "react-native/no-inline-styles": 2,
    "react-native/no-color-literals": 2
  }
}

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions