Skip to content

Commit

Permalink
feat: add recommended rules from @eslint-react/web-api (#655)
Browse files Browse the repository at this point in the history
  • Loading branch information
p-dubovitsky authored Jan 13, 2025
1 parent 65fbbfb commit 3568eac
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/configs/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export async function react(
'react-hooks-extra': plugins['@eslint-react/hooks-extra'],
'react-naming-convention': plugins['@eslint-react/naming-convention'],
'react-refresh': pluginReactRefresh,
'react-web-api': plugins['@eslint-react/web-api'],
},
},
{
Expand Down Expand Up @@ -108,7 +109,6 @@ export async function react(
// recommended rules react-hooks
'react-hooks/exhaustive-deps': 'warn',
'react-hooks/rules-of-hooks': 'error',

// react refresh
'react-refresh/only-export-components': [
'warn',
Expand Down Expand Up @@ -144,6 +144,13 @@ export async function react(
],
},
],
// recommended rules from @eslint-react/web-api
'react-web-api/no-leaked-event-listener': 'warn',

'react-web-api/no-leaked-interval': 'warn',
'react-web-api/no-leaked-resize-observer': 'warn',

'react-web-api/no-leaked-timeout': 'warn',

// recommended rules from @eslint-react
'react/ensure-forward-ref-using-ref': 'warn',
Expand Down

0 comments on commit 3568eac

Please sign in to comment.