Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. ESLint
  3. import

import

MITJavaScriptv2.32.0

An ESLint plugin to lint and validate ES2015+ import/export syntax, preventing issues with misspelling and module resolution.

GitHubGitHub
6.0k stars1.6k forks0 contributors

What is import?

eslint-plugin-import is an ESLint plugin that adds rules to validate and lint ES2015+ import/export syntax in JavaScript and TypeScript code. It helps prevent common issues like misspelled file paths, unresolved modules, and improper export usage, ensuring that module dependencies are correctly managed. The plugin enhances code reliability by catching errors early in the development process.

Target Audience

JavaScript and TypeScript developers using ES6+ modules who want to enforce best practices in import/export usage and avoid common module-related bugs. It is particularly useful for teams working on large codebases where module dependencies are complex.

Value Proposition

Developers choose eslint-plugin-import because it provides a comprehensive set of rules specifically for module syntax, integrates seamlessly with ESLint, and supports custom resolvers for different environments like Node.js and webpack. Its TypeScript support and ability to prevent subtle import errors make it a valuable tool for maintaining code quality.

Overview

ESLint plugin with rules that help validate proper imports.

Use Cases

Best For

  • Enforcing consistent import/export patterns in ES6+ JavaScript projects
  • Preventing unresolved module errors in complex dependency trees
  • Linting TypeScript projects with specific import/export rules
  • Detecting circular dependencies and extraneous packages
  • Ensuring proper module resolution in webpack or Node.js environments
  • Maintaining code style with import order and file extension conventions

Not Ideal For

  • Projects relying heavily on dynamic imports or require() with expressions, as many rules restrict these patterns.
  • Small, single-file scripts or quick prototypes where the overhead of ESLint and plugin configuration isn't justified.
  • Environments with highly custom or unsupported module resolution not covered by available resolvers.
  • Teams seeking zero-configuration linting tools without the need for extensive rule tuning or resolver setup.

Pros & Cons

Pros

Comprehensive Static Analysis

Ensures imports point to resolvable files and validates named exports, catching common errors like misspelled paths as highlighted in the 'no-unresolved' and 'named' rules.

Flexible Resolution Support

Supports custom resolvers for Node.js, webpack, TypeScript, and other environments, allowing adaptation to diverse project setups as detailed in the Resolvers section.

TypeScript Integration

Includes dedicated configuration and rules for TypeScript, with seamless setup using 'plugin:import/typescript' and 'eslint-import-resolver-typescript'.

Extensive Rule Coverage

Offers over 50 rules covering static analysis, style enforcement, and module systems, providing granular control over import/export practices.

Active Maintenance

Backed by Tidelift for enterprise support and regularly updated, ensuring compatibility with modern JavaScript ecosystems as seen in the version badges and changelogs.

Cons

Complex Configuration

Requires detailed setup for resolvers, parsers, and settings like extensions and cache, which can be overwhelming, especially with both legacy and flat config formats.

Dependency on External Packages

For non-standard environments, you must install and configure separate resolver packages, adding to project dependencies and potential maintenance headaches.

Performance Overhead

The static analysis and caching mechanisms can increase linting time, particularly in large codebases, as noted in the import/cache settings for tools like eslint_d.

Breaking Changes Risk

As the plugin evolves, deprecations and updates may require migration efforts, such as the shift from 'imports-first' to 'first' rule, demanding attention to changelogs.

Frequently Asked Questions

Quick Stats

Stars5,955
Forks1,550
Contributors0
Open Issues488
Last commit2 months ago
CreatedSince 2015

Tags

#es6-modules#hacktoberfest#import#lint#typescript#code-quality#eslint-plugin#javascript#eslint#linting#static-analysis

Included in

ESLint4.7k
Auto-fetched 1 day ago

Related Projects

PromisePromise

Enforce best practices for JavaScript promises

Stars1,004
Forks105
Last commit3 days ago
functionalfunctional

ESLint rules to disable mutation and promote fp in JavaScript and TypeScript.

Stars1,003
Forks36
Last commit1 day ago
boundariesboundaries

Enforce architectural boundaries in your JavaScript and TypeScript projects

Stars1,000
Forks24
Last commit2 days ago
fpfp

ESLint rules for functional programming

Stars967
Forks35
Last commit5 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub