{"id":602,"hash":"a471146243a41e08210b3ee1320a41f0b10cfcc33ab591a88e373abbde49fde0","pattern":"React eslint error missing in props validation","full_message":"I have the next code, eslint throw:\n\nreact/prop-types onClickOut; is missing in props validation\n\nreact/prop-types children; is missing in props validation\n\npropTypes was defined but eslint does not recognize it.\n\nimport React, { Component, PropTypes } from 'react';\n\nclass IxClickOut extends Component {\n  static propTypes = {\n    children: PropTypes.any,\n    onClickOut: PropTypes.func,\n  };\n\n componentDidMount() {\n    document.getElementById('app')\n      .addEventListener('click', this.handleClick);\n  }\n\n  componentWillUnmount() {\n    document.getElementById('app')\n      .removeEventListener('click', this.handleClick);\n  }\n\n  handleClick = ({ target }: { target: EventTarget }) => {\n    if (!this.containerRef.contains(target)) {\n      this.props.onClickOut();\n    }\n  };\n\n  containerRef: HTMLElement;\n\n  render() {\n    const { children, ...rest } = this.props;\n    const filteredProps = _.omit(rest, 'onClickOut');\n\n    return (\n      <div\n        {...filteredProps}\n        ref={container => {\n          this.containerRef = container;\n        }}\n      >\n        {children}\n      </div>\n    );\n  }\n}\n\nexport default IxClickOut;\n\npackage.json\n\n{\n  \"name\": \"verinmueblesmeteor\",\n  \"private\": true,\n  \"scripts\": {\n    \"start\": \"meteor run\",\n    \"ios\": \"NODE_ENV=developement meteor run ios\"\n  },\n  \"dependencies\": {\n    \"fine-uploader\": \"^5.10.1\",\n    \"foundation-sites\": \"^6.2.3\",\n    \"install\": \"^0.8.1\",\n    \"ix-gm-polygon\": \"^1.0.11\",\n    \"ix-type-building\": \"^1.4.4\",\n    \"ix-type-offer\": \"^1.0.10\",\n    \"ix-utils\": \"^1.3.7\",\n    \"keymirror\": \"^0.1.1\",\n    \"meteor-node-stubs\": \"^0.2.3\",\n    \"moment\": \"^2.13.0\",\n    \"npm\": \"^3.10.3\",\n    \"rc-slider\": \"^3.7.3\",\n    \"react\": \"^15.1.0\",\n    \"react-addons-pure-render-mixin\": \"^15.1.0\",\n    \"react-dom\": \"^15.1.0\",\n    \"react-fileupload\": \"^2.2.0\",\n    \"react-list\": \"^0.7.18\",\n    \"react-modal\": \"^1.4.0\",\n    \"react-redux\": \"^4.4.5\",\n    \"react-router\": \"^2.6.0\",\n    \"react-styleable\": \"^2.2.4\",\n    \"react-textarea-autosize\": \"^4.0.4\",\n    \"redux\": \"^3.5.2\",\n    \"redux-form\": \"^5.3.1\",\n    \"redux-thunk\": \"^2.1.0\",\n    \"rxjs\": \"^5.0.0-beta.9\",\n    \"rxjs-es\": \"^5.0.0-beta.9\",\n    \"socket.io\": \"^1.4.8\"\n  },\n  \"devDependencies\": {\n    \"autoprefixer\": \"^6.3.6\",\n    \"babel-eslint\": \"^6.0.4\",\n    \"babel-plugin-transform-decorators-legacy\": \"^1.3.4\",\n    \"babel-preset-es2015\": \"^6.9.0\",\n    \"babel-preset-react\": \"^6.5.0\",\n    \"babel-preset-stage-0\": \"^6.5.0\",\n    \"core-js\": \"^2.0.0\",\n    \"cssnano\": \"^3.7.1\",\n    \"eslint\": \"^2.12.0\",\n    \"eslint-config-airbnb\": \"^9.0.1\",\n    \"eslint-import-resolver-meteor\": \"^0.2.3\",\n    \"eslint-plugin-import\": \"^1.8.1\",\n    \"eslint-plugin-jsx-a11y\": \"^1.2.2\",\n    \"eslint-plugin-react\": \"^5.1.1\",\n    \"node-sass\": \"^3.8.0\",\n    \"postcss-cssnext\": \"^2.6.0\",\n    \"sasslets-animate\": \"0.0.4\"\n  },\n  \"cssModules\": {\n    \"ignorePaths\": [\n      \"node_modules\"\n    ],\n    \"jsClassNamingConvention\": {\n      \"camelCase\": true\n    },\n    \"extensions\": [\n      \"scss\",\n      \"sass\"\n    ],\n    \"postcssPlugins\": {\n      \"postcss-modules-values\": {},\n      \"postcss-modules-local-by-default\": {},\n      \"postcss-modules-extract-imports\": {},\n      \"postcss-modules-scope\": {},\n      \"autoprefixer\": {}\n    }\n  }\n}\n\n.babelrc\n\n{\n  \"presets\": [\n    \"es2015\",\n    \"react\",\n    \"stage-0\"\n  ],\n  \"whitelist\": [\n      \"es7.decorators\",\n      \"es7.classProperties\",\n      \"es7.exportExtensions\",\n      \"es7.comprehensions\",\n      \"es6.modules\"\n  ],\n  \"plugins\": [\"transform-decorators-legacy\"]\n}\n\n.eslintrc\n\n{\n  \"parser\": \"babel-eslint\",\n  \"extends\": \"airbnb\",\n  \"rules\": {\n    \"no-underscore-dangle\": [\"error\", { \"allow\": [_id, b_codes_id] }],\n  },\n  \"settings\": {\n    \"import/resolver\": \"meteor\"\n  },\n  \"globals\": {\n    \"_\": true,\n    \"CSSModule\": true,\n    \"Streamy\": true,\n    \"ReactClass\": true,\n    \"SyntheticKeyboardEvent\": true,\n  }\n}","ecosystem":"npm","package_name":"reactjs","package_version":null,"solution":"I know this answer is ridiculous, but consider just disabling this rule until the bugs are worked out or you've upgraded your tooling:\n\n/* eslint-disable react/prop-types */ // TODO: upgrade to latest eslint tooling\n\nOr disable project-wide in your eslintrc (or .eslintrc.cjs if setup using vite):\n\n\"rules\": {\n  \"react/prop-types\": \"off\"\n}","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/38684925/react-eslint-error-missing-in-props-validation","votes":268,"created_at":"2026-04-19T04:51:24.113829+00:00","updated_at":"2026-04-19T04:51:24.113829+00:00"}