{
"compilerOptions": {
"baseUrl": "./src",
"target": "ES6",
"jsx": "preserve",
"allowSyntheticDefaultImports": true
},
"exclude": ["build", "node_modules"]
}
NODE_PATH=src
{
"scripts": {
"start": "cross-env NODE_PATH=src react-scripts start",
}
}
- Mark
src
directory as Resource Root - Go to Settings -> Editor -> Code Style -> Javascript.
- Switch to Imports tab and select Use paths relative to the project, resource or sources root.
Thank you 👍
For Eslint
https://stackoverflow.com/a/42498220/5330819