fix: aligne eslint.config.js sur le canon flotte (ajout eslint-plugin-react-hooks + regle react-hooks/rules-of-hooks)
This commit is contained in:
@@ -3,6 +3,7 @@ import unicorn from 'eslint-plugin-unicorn';
|
||||
import promise from 'eslint-plugin-promise';
|
||||
import n from 'eslint-plugin-n';
|
||||
import raflint from 'eslint-plugin-raflint';
|
||||
import reactHooks from 'eslint-plugin-react-hooks';
|
||||
import pluginimport from 'eslint-plugin-import-x';
|
||||
import babelParser from '@babel/eslint-parser';
|
||||
import tseslint from 'typescript-eslint';
|
||||
@@ -50,6 +51,7 @@ export default [
|
||||
},
|
||||
plugins: {
|
||||
raflint,
|
||||
'react-hooks': reactHooks,
|
||||
},
|
||||
settings: {
|
||||
'import-x/resolver': {
|
||||
@@ -62,6 +64,9 @@ export default [
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
// Attrape « hook après return conditionnel » (ex. useMutation après `if (!open) return null`)
|
||||
// → crash « Rendered more hooks ». Absente jusqu'ici : ce bug est passé (AssignAgentsModal).
|
||||
'react-hooks/rules-of-hooks': 'error',
|
||||
'sonarjs/no-empty-function': 0,
|
||||
'unicorn/no-this-outside-of-class': 0,
|
||||
'sonarjs/no-unused-expressions': 0,
|
||||
|
||||
Reference in New Issue
Block a user