Logo
  • DB
  • About
  • Updates
eslint-plugin-import

Import with sanity.

❯ npm i --save-dev eslint-plugin-import
🏠 Homepage🐛 BugsGitHub LogoGitHubnpm Logonpm
🕵️‍♂️ Linter
  • 8 Configs
  • 45 Rules
GitHub LogoGitHub
  • JavaScript
  • 5.1K Stars
  • 37 Watchers
npm Logonpm
  • 12.7M Wkly Downloads
  • +38% WoW
  • 2.29.1 1.21 MB
📋 Requirements
  • Node: >=4
  • ESLint: ^2 || ^3 || ^4 || ...
🗂️ Keywords
  • code-quality
  • javascript
ConfigurationRules
🔴 electron
errors5
🟠 react
🟡 react-native
recommended5 error • 3 warn
🟢 stage-01 warn
⌨️ typescript1 off
🚸 warnings3 warn
RuleDescription🔧💡💭🗂️⚙️🔴🟠🟡🟢⌨️🚸
consistent-type-specifier-style

Enforce or ban the use of inline type-only markers for named imports.

🔧📖
default

Ensure a default export is present, given a default import.

dynamic-import-chunkname

Enforce a leading comment with the webpackChunkName for dynamic imports.

📖⚙️
export

Forbid any invalid exports, i.e. re-export of the same name.

exports-last

Ensure all exports appear after other statements.

📖
extensions

Ensure consistent use of file extension within the import path.

📖⚙️
first

Ensure all imports appear before other statements.

🔧📖
group-exports

Prefer named exports to be grouped together in a single export declaration

📖
imports-first

Replaced by import/first.

🔧📖
max-dependencies

Enforce the maximum number of dependencies a module can have.

📖⚙️
named

Ensure named imports correspond to a named export in the remote file.

⚙️🚫
namespace

Ensure imported namespaces contain dereferenced properties as they are dereferenced.

⚙️
newline-after-import

Enforce a newline after import statements.

🔧📏⚙️
no-absolute-path

Forbid import of modules using absolute paths.

🔧📖⚙️
no-amd

Forbid AMD require and define calls.

📖
no-anonymous-default-export

Forbid anonymous values as default exports.

📖⚙️
no-commonjs

Forbid CommonJS require calls and module.exports or exports.*.

📖⚙️
no-cycle

Forbid a module from importing a module with a dependency path back to itself.

📖⚙️
no-default-export

Forbid default exports.

📖
no-deprecated

Forbid imported names marked with @deprecated documentation tag.

📖⚠️
no-duplicates

Forbid repeated import of the same module in multiple places.

🔧⚙️⚠️⚠️
no-dynamic-require

Forbid require() calls with expressions.

📖⚙️
no-empty-named-blocks

Forbid empty named import blocks.

🔧💡📖
no-extraneous-dependencies

Forbid the use of extraneous packages.

⚙️
no-import-module-exports

Forbid import statements with CommonJS module.exports.

🔧⚙️
no-internal-modules

Forbid importing the submodules of other modules.

📖⚙️
no-mutable-exports

Forbid the use of mutable exports with var or let.

📖
no-named-as-default

Forbid use of exported name as identifier of default export.

⚠️⚠️
no-named-as-default-member

Forbid use of exported name as property of default export.

📖⚠️⚠️
no-named-default

Forbid named default exports.

📖
no-named-export

Forbid named exports.

📖
no-namespace

Forbid namespace (a.k.a. "wildcard" *) imports.

🔧📖⚙️
no-nodejs-modules

Forbid Node.js builtin modules.

📖⚙️
no-relative-packages

Forbid importing packages through relative paths.

🔧📖⚙️
no-relative-parent-imports

Forbid importing modules from parent directories.

📖⚙️
no-restricted-paths

Enforce which files can be imported in a given folder.

⚙️
no-self-import

Forbid a module from importing itself.

no-unassigned-import

Forbid unassigned imports

📖⚙️
no-unresolved

Ensure imports point to a file/module that can be resolved.

⚙️
no-unused-modules

Forbid modules without exports, or exports without matching import in another module.

📖⚙️
no-useless-path-segments

Forbid unnecessary path segments in import and require statements.

🔧📖⚙️
no-webpack-loader-syntax

Forbid webpack loader syntax in imports.

order

Enforce a convention in module import order.

🔧📖⚙️
prefer-default-export

Prefer a default export if module exports a single name or multiple names.

📖⚙️
unambiguous

Forbid potentially ambiguous parse goal (script vs. module).

📖
© 2024 Lintbase