I am working with create-react-app + typescript + eslint application and during build have such error:
Line 1:8: \'React\' was used before it was defined @t
Try adding import/resolver to your Eslint settings:
"settings": {
"react": { "version": "detect" },
"import/resolver": { "typescript": {} }
}
Maybe you will need to install it too:
$ yarn add -D eslint-import-resolver-typescript
If that doesn't work, you could change this rule
"@typescript-eslint/no-use-before-define": "off"
like this:
"no-use-before-define": "off"