A resolver plugin for eslint-plugin-import that adds support for module aliases, custom file extensions, and path mapping. Current stable version is 1.1.2 (last released in 2018). It allows developers to define alias mappings in ESLint configuration so that 'import' statements resolve correctly even when using module aliases or custom extensions. Unlike other resolvers like eslint-import-resolver-webpack or eslint-import-resolver-typescript, this one is lightweight and does not require webpack config; it works purely based on a simple alias map array. It supports Node.js >=4 and requires eslint-plugin-import >=1.4.0 as a peer dependency. The resolver is in maintenance mode with no updates since 2018.
npm install eslint-import-resolver-aliasVerified import paths — ran on the pinned version, not inferred.
Installs the package and configures alias resolution for import statements in ESLint.
Use [['^helper$', './utils/helper']] for exact match.
Order your alias array from most specific to least specific.
Explicitly set 'extensions' array including '.ts', '.tsx' if needed.
Consider alternative resolvers like eslint-import-resolver-typescript or eslint-import-resolver-webpack for modern projects.
Use absolute paths or ensure CWD is project root. Alternatively, connect to Resolve#basedir.
Run 'npm install --save-dev eslint-plugin-import' alongside eslint-import-resolver-alias.
Ensure the target module exists with one of the configured extensions. Or use exact regex pattern ['^@utils$', './utils'] and handle subpath separately.
If using object form, include 'map' key: alias: { map: [...] }. If not, use the shorthand: alias: [...].Ensure alias configuration is properly formatted, e.g., alias: { map: [['@', './src']] } or alias: [['@', './src']].