Skip to content

Commit

Permalink
establishing rules for React components
Browse files Browse the repository at this point in the history
  • Loading branch information
jinmayamashita authored Mar 17, 2024
1 parent bcdb969 commit 78aae0b
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions packages/eslint-config-custom/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,9 @@ module.exports = {
format: ['PascalCase'],
},
],
'react/jsx-handler-names': [
2,
{
eventHandlerPrefix: 'handle',
eventHandlerPropPrefix: 'on',
checkLocalVariables: false,
checkInlineFunction: false,
},
],
'react/jsx-filename-extension': [2, { extensions: ['.tsx'] }],
// React components
'react/jsx-handler-names': 2,
'react/no-danger': 2,
'react/destructuring-assignment': [2, 'always'],
'react/hook-use-state': [2, { allowDestructuredState: false }],
'react/jsx-props-no-spreading': 2,
Expand Down

0 comments on commit 78aae0b

Please sign in to comment.