Similar question to this post on StackOverflow but I cannot seem to get rid of this warning after trying everything I could find on the internet. Github Issue.
Line 1:8: 'React' was used before it was defined @typescript-eslint/no-use-before-define
I've tried adding these to the rules in .eslintrc.json
but neither seem to remove the warning.
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": "off"
"no-use-before-define": [0],
"@typescript-eslint/no-use-before-define": [1]
This issue doesn't exist on my other projects. I've tried copying package.json
and .eslintrc.json
from the other projects and re-installing node_modules
, however it still persists.
Does anyone have any other suggestions to resolve the warning? Thanks in advance!