From 78245b3748ce0a339c657561dc6dc6afebde4c47 Mon Sep 17 00:00:00 2001 From: Braden MacDonald Date: Tue, 3 Sep 2024 16:55:00 -0700 Subject: [PATCH] feat: Don't require default props for function components (#156) --- .eslintrc.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 14967891..d691689a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -65,5 +65,12 @@ module.exports = { 'react/destructuring-assignment': 'off', 'no-plusplus': 'off', strict: 'off', + // We don't require 'defaultProps' for function components (they're + // deprecated: https://github.com/facebook/react/pull/16210). + // It's better to use native JavaScript/TypeScript defaults and TS types. + 'react/require-default-props': ['error', { + classes: 'defaultProps', + functions: 'ignore', + }], }, };