This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import names. All the goodness that the ES2015+ static module syntax intends to provide, is marked up in your editor. The maintainers of eslint-plugin-import and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open-source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. With the advent of module bundlers and the current state of modules and module syntax specs, it's not always obvious where import x from 'module' should look to find the file behind module. Up through v0.10ish, this plugin has directly used substack's resolve plugin, which implements Node's import behavior. This works pretty well in most cases.

Features

  • Ensure imports point to a file/module that can be resolved
  • Ensure named imports correspond to a named export in the remote file
  • Ensure a default export is present, given a default import
  • Ensure imported namespaces contain dereferenced properties as they are dereferenced
  • Restrict which files can be imported in a given folder
  • Forbid import of modules using absolute paths

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow eslint-plugin-import

eslint-plugin-import Web Site

You Might Also Like
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of eslint-plugin-import!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Source Code Analysis Tool, JavaScript Code Review Software

Registered

2022-05-19