🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

eslint-import-resolver-alias

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-import-resolver-alias

a simple Node behavior import resolution plugin for eslint-plugin-import, supporting module alias.

1.1.2
latest
Source
npm
Version published
Weekly downloads
1M
-4.47%
Maintainers
1
Weekly downloads
 
Created

What is eslint-import-resolver-alias?

The eslint-import-resolver-alias package is an ESLint plugin that allows you to resolve import paths using custom alias mappings. This is particularly useful in projects where you have complex directory structures and want to simplify import statements.

What are eslint-import-resolver-alias's main functionalities?

Custom Alias Resolution

This feature allows you to define custom alias mappings for your project. In the example, `@components` is mapped to `./src/components` and `@utils` is mapped to `./src/utils`. This makes it easier to import modules without having to use relative paths.

{"settings":{"import/resolver":{"alias":{"map":[["@components","./src/components"],["@utils","./src/utils"]],"extensions":[".js",".jsx",".ts",".tsx"]}}}}

Support for Multiple Extensions

You can specify multiple file extensions that the resolver should consider. In this example, the resolver will look for files with `.js`, `.jsx`, `.ts`, and `.tsx` extensions when resolving the `@components` alias.

{"settings":{"import/resolver":{"alias":{"map":[["@components","./src/components"]],"extensions":[".js",".jsx",".ts",".tsx"]}}}}

Other packages similar to eslint-import-resolver-alias

Keywords

eslint

FAQs

Package last updated on 08 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts