Skip to content

Commit 8a34b7c

Browse files
authored
Add ESLint check for incorrect propTypes usage (#3840) (#4048)
1 parent 33f1294 commit 8a34b7c

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

packages/eslint-config-react-app/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ module.exports = {
186186
'import/no-webpack-loader-syntax': 'error',
187187

188188
// https://github.com/yannickcr/eslint-plugin-react/tree/master/docs/rules
189+
'react/forbid-foreign-prop-types': ['warn', { allowInPropTypes: true }],
189190
'react/jsx-no-comment-textnodes': 'warn',
190191
'react/jsx-no-duplicate-props': ['warn', { ignoreCase: true }],
191192
'react/jsx-no-target-blank': 'warn',

packages/eslint-config-react-app/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"eslint-plugin-flowtype": "^2.34.1",
1717
"eslint-plugin-import": "^2.6.0",
1818
"eslint-plugin-jsx-a11y": "^6.0.2",
19-
"eslint-plugin-react": "^7.1.0"
19+
"eslint-plugin-react": "^7.7.0"
2020
},
2121
"dependencies": {
2222
"confusing-browser-globals": "^1.0.0"

packages/react-error-overlay/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"eslint-plugin-flowtype": "2.41.0",
4848
"eslint-plugin-import": "2.8.0",
4949
"eslint-plugin-jsx-a11y": "6.0.3",
50-
"eslint-plugin-react": "7.5.1",
50+
"eslint-plugin-react": "7.7.0",
5151
"flow-bin": "^0.63.1",
5252
"html-entities": "1.2.1",
5353
"jest": "22.1.2",

packages/react-scripts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"eslint-plugin-flowtype": "2.41.0",
4242
"eslint-plugin-import": "2.8.0",
4343
"eslint-plugin-jsx-a11y": "6.0.3",
44-
"eslint-plugin-react": "7.5.1",
44+
"eslint-plugin-react": "7.7.0",
4545
"extract-text-webpack-plugin": "3.0.2",
4646
"file-loader": "1.1.6",
4747
"fs-extra": "5.0.0",

0 commit comments

Comments
 (0)