Skip to content

Commit 3568eac

Browse files
authored
feat: add recommended rules from @eslint-react/web-api (#655)
1 parent 65fbbfb commit 3568eac

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/configs/react.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export async function react(
7878
'react-hooks-extra': plugins['@eslint-react/hooks-extra'],
7979
'react-naming-convention': plugins['@eslint-react/naming-convention'],
8080
'react-refresh': pluginReactRefresh,
81+
'react-web-api': plugins['@eslint-react/web-api'],
8182
},
8283
},
8384
{
@@ -108,7 +109,6 @@ export async function react(
108109
// recommended rules react-hooks
109110
'react-hooks/exhaustive-deps': 'warn',
110111
'react-hooks/rules-of-hooks': 'error',
111-
112112
// react refresh
113113
'react-refresh/only-export-components': [
114114
'warn',
@@ -144,6 +144,13 @@ export async function react(
144144
],
145145
},
146146
],
147+
// recommended rules from @eslint-react/web-api
148+
'react-web-api/no-leaked-event-listener': 'warn',
149+
150+
'react-web-api/no-leaked-interval': 'warn',
151+
'react-web-api/no-leaked-resize-observer': 'warn',
152+
153+
'react-web-api/no-leaked-timeout': 'warn',
147154

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

0 commit comments

Comments
 (0)