Skip to content

Commit

Permalink
Add react/no-object-type-as-default-prop rule
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jan 21, 2025
1 parent 1336af5 commit a8ad744
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ export default [
unnamedComponents: 'arrow-function',
},
],
'react/hook-use-state': 'error',
'react/hook-use-state': [
'error',
{
allowDestructuredState: true,
},
],
'react/iframe-missing-sandbox': 'error',
'react/no-access-state-in-setstate': 'error',
'react/no-array-index-key': 'error',
Expand All @@ -51,6 +56,7 @@ export default [
'react/no-invalid-html-attribute': 'error',
'react/no-is-mounted': 'error',
'react/no-namespace': 'error',
'react/no-object-type-as-default-prop': 'error',
'react/no-redundant-should-component-update': 'error',
'react/no-render-return-value': 'error',
'react/no-typos': 'error',
Expand Down

0 comments on commit a8ad744

Please sign in to comment.