I would like to use custom root, so I can import file like this import A from ‘/components/A;
Unfortunately, eslint-plugin-import can’t figure out that I mention to custom root.
I turn on import/no-relative-parent-imports.
When I import the path like import { UserContext } from '/contexts/UserContext';
It shows me an error Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `useAuthorization.js` to same directory as `/contexts/UserContext` or consider making `/contexts/UserContext` a package.eslint(import/no-relative-parent-imports)
I would like to use custom root, so I can import file like this
import A from ‘/components/A;
Unfortunately, eslint-plugin-import can’t figure out that I mention to custom root.
I turn on
import/no-relative-parent-imports
. When I import the path likeimport { UserContext } from '/contexts/UserContext';
It shows me an errorRelative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `useAuthorization.js` to same directory as `/contexts/UserContext` or consider making `/contexts/UserContext` a package.eslint(import/no-relative-parent-imports)
What did I miss? or it just can’t use like this.
.babelrc
.eslintrc