Fix misuse of Hooks with useRef (#24)
All checks were successful
continuous-integration/drone/push Build is passing

Reviewed-on: https://git.siklos-chaneru.duckdns.org/Siklos/svg-layout-designer-react/pulls/24
This commit is contained in:
Siklos 2022-08-11 09:10:06 -04:00
parent ac56f84196
commit d11dfec22b
9 changed files with 76 additions and 27 deletions

View file

@ -19,6 +19,7 @@ module.exports = {
plugins: [
'only-warn',
'react',
'react-hooks',
'@typescript-eslint'
],
rules: {
@ -29,5 +30,7 @@ module.exports = {
'@typescript-eslint/semi': ['warn', 'always'],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-hooks/exhaustive-deps': 'warn' // Checks effect dependencies
}
};