{"id":19660,"library":"eslint-import-resolver-babel-root-import","title":"eslint-import-resolver-babel-root-import","description":"A resolver for eslint-plugin-import that works with babel-plugin-root-import to allow root-based module imports (e.g., importing from a root directory using a pattern). The current stable version is 1.0.0, released as a major update. This package is a thin wrapper around babel-plugin-root-import, providing an eslint resolver that understands the same root-import syntax. It has no active development. The key differentiator is enabling eslint-plugin-import to resolve modules using the babel-root-import plugin's custom prefix/suffix mappings.","status":"maintenance","version":"0.0.2","language":"javascript","source_language":"en","source_url":"https://github.com/olalonde/eslint-import-resolver-babel-root-import","tags":["javascript","eslint","eslint-plugin-import","eslint-import-resolver","babel","babel-plugin","module","babel-root-import","rewrite"],"install":[{"cmd":"npm install eslint-import-resolver-babel-root-import","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-import-resolver-babel-root-import","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-import-resolver-babel-root-import","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core dependency that provides the root import mapping logic.","package":"babel-plugin-root-import","optional":false},{"reason":"Peer dependency required for resolver integration.","package":"eslint-plugin-import","optional":true}],"imports":[{"note":"The resolver is referenced by the shorthand name 'babel-root-import' in .eslintrc, not the package name.","wrong":"\"settings\": { \"import/resolver\": \"eslint-import-resolver-babel-root-import\" }","symbol":"eslint-import-resolver-babel-root-import","correct":"\"settings\": { \"import/resolver\": \"babel-root-import\" }"},{"note":"This is the underlying plugin that must also be configured in Babel.","wrong":"","symbol":"babel-plugin-root-import","correct":"require('babel-plugin-root-import')"},{"note":"Options are passed as an object to the resolver, matching babel-plugin-root-import's configuration.","wrong":"","symbol":"import/resolver object","correct":"\"settings\": { \"import/resolver\": { \"babel-root-import\": { \"rootPathSuffix\": \"src\" } } }"}],"quickstart":{"code":"// .eslintrc.json\n{\n  \"settings\": {\n    \"import/resolver\": {\n      \"babel-root-import\": {\n        \"rootPathSuffix\": \"src\",\n        \"rootPathPrefix\": \"~\"\n      }\n    }\n  }\n}\n\n// Install\nnpm install --save-dev eslint-plugin-import eslint-import-resolver-babel-root-import babel-plugin-root-import","lang":"json","description":"This shows how to configure eslint-plugin-import to use the babel-root-import resolver and install the necessary dependencies."},"warnings":[{"fix":"Update your .eslintrc to use the shorthand 'babel-root-import' instead of the full package name.","message":"Version 1.0.0 changed the resolver name from 'eslint-import-resolver-babel-root-import' to 'babel-root-import' in settings.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Ensure you are using the most up-to-date version of babel-plugin-root-import.","message":"The babel-plugin-root-import package was renamed and is now maintained under a new repository.","severity":"deprecated","affected_versions":"all"},{"fix":"Install both packages and configure babel-plugin-root-import in your Babel config.","message":"The resolver requires babel-plugin-root-import to be installed and configured separately.","severity":"gotcha","affected_versions":"all"},{"fix":"Check compatibility with your eslint-plugin-import version; consider using the built-in eslint-import-resolver-node or eslint-import-resolver-alias.","message":"This resolver may not work with eslint-plugin-import versions that have breaking changes in the resolver API.","severity":"gotcha","affected_versions":">=2.18.0"},{"fix":"Use a more robust resolver like eslint-import-resolver-alias if you need extensive support.","message":"The package has very limited documentation and may break silently if dependencies are mismatched.","severity":"breaking","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.0.0':44 'activ':77 'allow':24 'around':56 'babel':5,19,58,94,112,114,118 'babel-plugin':113 'babel-plugin-root-import':18,57 'babel-root-import':93,117 'base':27 'current':40 'custom':99 'develop':78 'differenti':81 'directori':35 'e.g':30 'enabl':83 'eslint':2,12,64,85,103,105,109 'eslint-import-resolv':108 'eslint-import-resolver-babel-root-import':1 'eslint-plugin-import':11,84,104 'import':3,7,14,22,29,31,61,72,87,96,107,110,120 'javascript':102 'key':80 'major':48 'map':101 'modul':28,90,116 'packag':51 'pattern':38 'plugin':13,20,59,86,97,106,115 'prefix/suffix':100 'provid':62 'releas':45 'resolv':4,9,65,89,111 'rewrit':121 'root':6,21,26,34,60,71,95,119 'root-bas':25 'root-import':70 'stabl':41 'syntax':73 'thin':54 'understand':67 'updat':49 'use':36,91 'version':42 'work':16 'wrapper':55","created_at":"2026-04-25T11:18:58.665063+00:00","updated_at":"2026-04-25T11:18:58.665063+00:00","problems":[{"fix":"Run `npm install --save-dev eslint-import-resolver-babel-root-import` and use 'babel-root-import' in settings.","cause":"The resolver is not installed or not referenced correctly in .eslintrc.","error":"Error: No resolver found for 'babel-root-import'"},{"fix":"Configure both the resolver in .eslintrc and the plugin in your Babel config with same settings.","cause":"The root path mapping is not configured or babel-plugin-root-import is not set up.","error":"Unable to resolve path to module '~/components/Button'"},{"fix":"Check that you have the correct version (v1.0.0) and that babel-plugin-root-import is installed.","cause":"The package does not export the correct resolver interface for eslint-plugin-import.","error":"Resolve error: Failed to load resolver: babel-root-import"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/olalonde/eslint-import-resolver-babel-root-import","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/eslint-import-resolver-babel-root-import","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}