Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-import-resolver-typescript

Package Overview
Dependencies
Maintainers
3
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-import-resolver-typescript

This plugin adds `TypeScript` support to `eslint-plugin-import`

  • 3.6.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9.8M
increased by2.05%
Maintainers
3
Weekly downloads
 
Created

What is eslint-import-resolver-typescript?

The eslint-import-resolver-typescript package is a plugin for ESLint that helps in resolving import paths for TypeScript files. It allows ESLint to understand TypeScript syntax and resolve paths according to the TypeScript compiler options. This is particularly useful when using features like path aliases and custom module directories in TypeScript projects.

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

Resolving TypeScript Path Aliases

This feature allows the resolver to use TypeScript's path aliases defined in tsconfig.json to resolve modules, which helps ESLint to understand custom path mappings.

module.exports = {
  settings: {
    'import/resolver': {
      typescript: {
        // use <root>/tsconfig.json
        project: '.'
      }
    }
  }
};

Support for Multiple tsconfig Files

The resolver can be configured to use multiple tsconfig.json files, which is useful in monorepos or projects with multiple TypeScript configurations.

module.exports = {
  settings: {
    'import/resolver': {
      typescript: {
        // a list of tsconfig.json to use
        project: ['tsconfig.json', 'packages/*/tsconfig.json']
      }
    }
  }
};

Ignoring TypeScript Errors

This feature allows the resolver to ignore TypeScript errors when resolving paths. It is useful when you want ESLint to focus on import/export issues without being blocked by TypeScript compilation errors.

module.exports = {
  settings: {
    'import/resolver': {
      typescript: {
        // ignore TypeScript errors
        alwaysTryTypes: true
      }
    }
  }
};

Other packages similar to eslint-import-resolver-typescript

Keywords

FAQs

Package last updated on 09 Aug 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc