@@ -314,14 +314,16 @@ module.exports = {
314314 'test/jest/rendering.js' ,
315315 'ui/**/*.js' ,
316316 ] ,
317- extends : [ 'plugin:react/recommended' , 'plugin:react-hooks/recommended' ] ,
317+ extends : [ 'plugin:react/recommended' ] ,
318318 parserOptions : {
319319 ecmaFeatures : {
320320 jsx : true ,
321321 } ,
322322 } ,
323- plugins : [ 'react' , 'react-compiler' ] ,
323+ plugins : [ 'react' , 'react-hooks' , 'react- compiler'] ,
324324 rules : {
325+ 'react-hooks/rules-of-hooks' : 'error' ,
326+ 'react-hooks/exhaustive-deps' : 'warn' ,
325327 'react-compiler/react-compiler' : 'error' ,
326328 'react/no-unused-prop-types' : 'error' ,
327329 'react/no-unused-state' : 'error' ,
@@ -357,14 +359,16 @@ module.exports = {
357359 */
358360 {
359361 files : [ 'ui/**/*.ts' , 'ui/**/*.tsx' ] ,
360- extends : [ 'plugin:react/recommended' , 'plugin:react-hooks/recommended' ] ,
362+ extends : [ 'plugin:react/recommended' ] ,
361363 parserOptions : {
362364 ecmaFeatures : {
363365 jsx : true ,
364366 } ,
365367 } ,
366- plugins : [ 'react' , 'react-compiler' ] ,
368+ plugins : [ 'react' , 'react-hooks' , 'react- compiler'] ,
367369 rules : {
370+ 'react-hooks/rules-of-hooks' : 'error' ,
371+ 'react-hooks/exhaustive-deps' : 'warn' ,
368372 'react-compiler/react-compiler' : 'error' ,
369373 'react/no-unused-prop-types' : 'warn' ,
370374 'react/no-unused-state' : 'warn' ,
@@ -378,7 +382,6 @@ module.exports = {
378382 'react/prop-types' : 'off' ,
379383 'react/no-children-prop' : 'off' ,
380384 'react/jsx-key' : 'warn' , // TODO - increase this into 'error' level
381- 'react-hooks/rules-of-hooks' : 'error' ,
382385 } ,
383386 settings : {
384387 react : {
0 commit comments