Skip to content

Commit

Permalink
feat: Don't require default props for function components (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradenmacdonald authored Sep 3, 2024
1 parent 99261e2 commit 78245b3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
}],
},
};

0 comments on commit 78245b3

Please sign in to comment.