diff --git a/index.js b/index.js index 571ef86..6ec0ab9 100644 --- a/index.js +++ b/index.js @@ -24,6 +24,13 @@ module.exports = { 'react/button-has-type': 'error', 'react/jsx-child-element-spacing': 'error', 'react/default-props-match-prop-types': 'error', + 'react/function-component-definition': [ + 'error', + { + namedComponents: 'arrow-function', + unnamedComponents: 'arrow-function' + } + ], 'react/no-access-state-in-setstate': 'error', 'react/no-array-index-key': 'error', 'react/no-children-prop': 'error', @@ -55,7 +62,8 @@ module.exports = { 'react/require-default-props': [ 'error', { - forbidDefaultForRequired: true + forbidDefaultForRequired: true, + ignoreFunctionalComponents: true } ], 'react/self-closing-comp': 'error', diff --git a/package.json b/package.json index f023b1d..c5d88f1 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "devDependencies": { "ava": "^2.1.0", "eslint": "^6.0.1", - "eslint-plugin-react": "^7.17.0", + "eslint-plugin-react": "^7.18.3", "eslint-plugin-react-hooks": "^2.3.0", "is-plain-obj": "^2.0.0", "react": "^16.8.6", @@ -61,7 +61,7 @@ }, "peerDependencies": { "eslint": ">=6", - "eslint-plugin-react": ">=7.17.0", + "eslint-plugin-react": ">=7.18.3", "eslint-plugin-react-hooks": ">=2.3.0" } }