From 8a34b7cc77099c7f591d64726a8106c02104f8f8 Mon Sep 17 00:00:00 2001 From: Ian Sutherland Date: Sun, 25 Mar 2018 16:17:41 -0600 Subject: [PATCH] Add ESLint check for incorrect propTypes usage (#3840) (#4048) --- packages/eslint-config-react-app/index.js | 1 + packages/eslint-config-react-app/package.json | 2 +- packages/react-error-overlay/package.json | 2 +- packages/react-scripts/package.json | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/eslint-config-react-app/index.js b/packages/eslint-config-react-app/index.js index 54dfe334733..7d2e716956a 100644 --- a/packages/eslint-config-react-app/index.js +++ b/packages/eslint-config-react-app/index.js @@ -186,6 +186,7 @@ module.exports = { 'import/no-webpack-loader-syntax': 'error', // https://github.com/yannickcr/eslint-plugin-react/tree/master/docs/rules + 'react/forbid-foreign-prop-types': ['warn', { allowInPropTypes: true }], 'react/jsx-no-comment-textnodes': 'warn', 'react/jsx-no-duplicate-props': ['warn', { ignoreCase: true }], 'react/jsx-no-target-blank': 'warn', diff --git a/packages/eslint-config-react-app/package.json b/packages/eslint-config-react-app/package.json index 45dfc42e76e..c4b51925e69 100644 --- a/packages/eslint-config-react-app/package.json +++ b/packages/eslint-config-react-app/package.json @@ -16,7 +16,7 @@ "eslint-plugin-flowtype": "^2.34.1", "eslint-plugin-import": "^2.6.0", "eslint-plugin-jsx-a11y": "^6.0.2", - "eslint-plugin-react": "^7.1.0" + "eslint-plugin-react": "^7.7.0" }, "dependencies": { "confusing-browser-globals": "^1.0.0" diff --git a/packages/react-error-overlay/package.json b/packages/react-error-overlay/package.json index 282cca890d0..cdaffae49d3 100644 --- a/packages/react-error-overlay/package.json +++ b/packages/react-error-overlay/package.json @@ -47,7 +47,7 @@ "eslint-plugin-flowtype": "2.41.0", "eslint-plugin-import": "2.8.0", "eslint-plugin-jsx-a11y": "6.0.3", - "eslint-plugin-react": "7.5.1", + "eslint-plugin-react": "7.7.0", "flow-bin": "^0.63.1", "html-entities": "1.2.1", "jest": "22.1.2", diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index 69bc74f2862..31b417c8328 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -41,7 +41,7 @@ "eslint-plugin-flowtype": "2.41.0", "eslint-plugin-import": "2.8.0", "eslint-plugin-jsx-a11y": "6.0.3", - "eslint-plugin-react": "7.5.1", + "eslint-plugin-react": "7.7.0", "extract-text-webpack-plugin": "3.0.2", "file-loader": "1.1.6", "fs-extra": "5.0.0",