A resolver for eslint-plugin-import that maps root-relative module paths (e.g., '@/', '~/') according to babel-plugin-root-import configuration. It reads settings from `.babelrc` or allows inline options in `.eslintrc`. This fork (v1.1.1) fixes compatibility with babel-plugin-root-import ^5.1.0, unlike the original resolver which only supported older versions. It is a small, single-purpose package with no updates since 2017, indicating stable functionality but potential deprecation risk due to newer alternatives like eslint-import-resolver-typescript.
npm install eslint-import-resolver-babel-plugin-root-importVerified import paths — ran on the pinned version, not inferred.
Shows how to configure the resolver in .eslintrc (inline or via .babelrc) and how root-relative imports are resolved.
If using babel.config.js, pass options inline in .eslintrc as shown in the quickstart.
Upgrade eslint-plugin-import to >=1.9.2.
Migrate to a maintained resolver if encountering issues.
Use the exact string 'babel-plugin-root-import' as the key.
Ensure .eslintrc settings include 'import/resolver': 'babel-plugin-root-import' and babel-plugin-root-import is installed and configured.
Install eslint-plugin-import and eslint-import-resolver-babel-plugin-root-import, then add settings in .eslintrc.
Run npm install --save-dev babel-plugin-root-import.