Skip to content

TypeError: Cannot read property 'properties' of null #1499

Closed
@brunolemos

Description

TypeError: Cannot read property 'properties' of null
    at annotation.types.reduce (/Users/brunolemos/Projects/devhub/node_modules/eslint-plugin-react/lib/rules/default-props-match-prop-types.js:180:44)
    at Array.reduce (native)
    at getPropertiesFromIntersectionTypeAnnotationNode (/Users/brunolemos/Projects/devhub/node_modules/eslint-plugin-react/lib/rules/default-props-match-prop-types.js:173:31)
    at getPropTypesFromTypeAnnotation (/Users/brunolemos/Projects/devhub/node_modules/eslint-plugin-react/lib/rules/default-props-match-prop-types.js:197:26)
    at Object.handleStatelessComponent (/Users/brunolemos/Projects/devhub/node_modules/eslint-plugin-react/lib/rules/default-props-match-prop-types.js:331:42)
    at updatedRuleInstructions.(anonymous function) (/Users/brunolemos/Projects/devhub/node_modules/eslint-plugin-react/lib/util/Components.js:666:75)
    at listeners.(anonymous function).forEach.listener (/Users/brunolemos/Projects/devhub/node_modules/eslint/lib/util/safe-emitter.js:47:58)
    at Array.forEach (native)
    at Object.emit (/Users/brunolemos/Projects/devhub/node_modules/eslint/lib/util/safe-emitter.js:47:38)
    at NodeEventGenerator.applySelector (/Users/brunolemos/Projects/devhub/node_modules/eslint/lib/util/node-event-generator.js:251:26)
    at NodeEventGenerator.applySelectors (/Users/brunolemos/Projects/devhub/node_modules/eslint/lib/util/node-event-generator.js:280:22)
{
    "react": "^16.0.0",
    "react-native": "0.49.3",
    "babel-eslint": "^8.0.1",
    "eslint": "^4.9.0",
    "eslint-config-airbnb": "^16.1.0",
    "eslint-config-prettier": "^2.6.0",
    "eslint-config-react-app": "^2.0.1",
    "eslint-plugin-babel": "^4.1.2",
    "eslint-plugin-flowtype": "^2.39.1",
    "eslint-plugin-import": "^2.7.0",
    "eslint-plugin-jsx-a11y": "^6.0.2",
    "eslint-plugin-prettier": "^2.3.1",
    "eslint-plugin-react": "^7.4.0",
    "eslint-plugin-react-native": "^3.1.0"
}
.eslintrc
{
  "parser": "babel-eslint",
  "extends": [
    "airbnb",
    "plugin:flowtype/recommended",
    "plugin:react/recommended",
    "prettier",
    "prettier/flowtype",
    "prettier/react"
  ],
  "env": {
    "es6": true,
    "jest": true,
    "node": true
  },
  "globals": {
    "__DEV__": true
  },
  "plugins": [
    "babel",
    "flowtype",
    "import",
    "react",
    "react-native",
    "prettier"
  ],
  "parserOptions": {
    "ecmaVersion": 6,
    "ecmaFeatures": {
      "jsx": true
    },
    "sourceType": "module"
  },
  "settings": {
    "import/resolver": {
      "node": {
        "extensions": [
          ".js",
          ".jsx",
          ".android.js",
          ".ios.js"
        ]
      }
    }
  },
  "rules": {
    "react/jsx-filename-extension": 0,
    "react/prefer-stateless-function": [
      "error",
      {
        "ignorePureComponents": true
      }
    ],
    "react/require-default-props": 0,
    "no-case-declarations": 0,
    "no-confusing-arrow": 0,
    "no-console": [
      "error",
      {
        "allow": [
          "debug",
          "error",
          "warn"
        ]
      }
    ],
    "no-underscore-dangle": 0,
    "no-nested-ternary": 0,
    "react-native/no-unused-styles": 2,
    "react-native/split-platform-components": 2,
    "react-native/no-color-literals": 2,
    "no-plusplus": 0,
    "prettier/prettier": [
      "error",
      {
        "semi": false,
        "singleQuote": true,
        "trailingComma": "all"
      }
    ]
  }
}

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions