I add typescript config for paths (alias):
tsconfig.json
{
"compilerOptions": {
"jsx": "react",
"baseUrl": "src",
"paths": {
"@components/*": ["components/*"]
}
},
"exclude": [
"node_modules",
"public"
]
}
After that I try import somthing like this:
import Header from '@components/header';
And now I get error in eslint: ESLint: Unable to resolve path to module '@components/header'.(import/no-unresolved)