A babel-plugin-root-import resolver for eslint-plugin-import.
npm install --save-dev eslint-plugin-import eslint-import-resolver-babel-root-import-fixed
Inside your .eslintrc
file, pass this resolver to eslint-plugin-import
:
"settings": {
"import/resolver": {
"node": {},
"eslint-import-resolver-babel-root-import-fixed": {}
}
}
And see babel-root-import to know how to configure your prefix/suffix.
{
"xo": {
"extends": "prettier",
"plugins": ["prettier"],
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module"
},
"rules": {},
"settings": {
"import/resolver": {
"node": {},
"eslint-import-resolver-babel-root-import-fixed": {}
}
}
}
}
MIT, see LICENSE.md for details.