NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #823 most downloaded on npm
Import with sanity.
Last release 1 years ago
20 Jun 2025
Release timing varies
gaps range from 3 weeks to 9 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
4 versions withdrawn
withdrawn after publishing
12 years old
132 releases · first in 2015
Fixed code that relied on removed dependencies. ([#604], thanks [@moeriki])
[unambiguous] rule: report modules that are not unambiguously ES modules.
unambiguous] rule: report modules that are not unambiguously ES modules.recommended shared config. Roughly errors and warnings mixed together,
with some parserOptions in the mix. ([#402])react shared config: added jsx: true to parserOptions.ecmaFeatures.no-webpack-loader-syntax] rule: forbid custom Webpack loader syntax in imports. ([#586], thanks [@fson]!)newlines-between: "ignore" to [order] ([#519], thanks [@sompylasar])no-unassigned-import] rule ([#529], thanks [@jfmengels])import/extensions setting] defaults to ['.js']. ([#306], thanks [@benmosher])import/ignore setting] defaults to nothing, and ambiguous modules are ignored natively. This means importing from CommonJS modules will no longer be reported by [default], [named], or [namespace], regardless of import/ignore. ([#270], thanks [@benmosher])newline-after-import]: Removed need for an empty line after an inline require call ([#570], thanks [@sindresorhus])order]: Default value for newlines-between option is now ignore ([#519], thanks [@sompylasar])imports-first is renamed to [first]. imports-first alias will continue to
exist, but may be removed in a future major release.no-unresolved].
Other rules will ignore case-mismatches on paths on case-insensitive filesystems. ([#311])no-internal-modules]: support @-scoped packages ([#577]+[#578], thanks [@spalger])One column per quarter.
Nothing published for this version
Nothing published for this version
Added [no-dynamic-require] rule: forbid require() calls with expressions. ([#567], [#568], thanks [@jfmengels])
no-dynamic-require] rule: forbid require() calls with expressions. ([#567], [#568], thanks [@jfmengels])no-internal-modules] rule: restrict deep package imports to specific folders. ([#485], thanks [@spalger]!)extensions]: allow override of a chosen default with options object ([#555], thanks [@ljharb]!)no-named-as-default] no longer false-positives on export default from '...' ([#566], thanks [@preco21])default]: allow re-export of values from ignored files as default ([#545], thanks [@skyrpex])Added an allow option to [no-nodejs-modules] to allow exceptions ([#452], [#509], thanks [@jfmengels] and [@ljharb]).
allow option to [no-nodejs-modules] to allow exceptions ([#452], [#509], thanks [@jfmengels] and [@ljharb]).no-absolute-path] rule ([#530], [#538], thanks [@jfmengels])max-dependencies] for specifying the maximum number of dependencies (both import and require) a module can have. (see [#489], thanks [@tizmagik])no-extraneous-dependencies], after much bikeshedding. Thanks, [@knpwrs]! ([#527])no-named-as-default-member] Allow default import to have a property named "default" ([#507], [#508], thanks [@jquense] for both!)[import/parsers setting]: parse some dependencies (i.e. TypeScript!) with a different parser than the ESLint-configured parser. ([#503], thanks [@benm
import/parsers setting]: parse some dependencies (i.e. TypeScript!) with a different parser than the ESLint-configured parser. ([#503], thanks [@benmosher])namespace] exception for get property from namespace import, which are re-export from commonjs module ([#499] fixes [#416], thanks [@wKich])allowComputed option for [namespace] rule. If set to true, won't report computed member references to namespaces. (see [#456])
allowComputed option for [namespace] rule. If set to true, won't report
computed member references to namespaces. (see [#456])no-nodejs-modules] error message to include the module's name ([#453], [#461], thanks [@jfmengels] and [@ljharb])import/extensions setting] is respected in spite of the appearance of imports
in an imported file. (fixes [#478], thanks [@rhys-vdw])[import/external-module-folders setting]: a possibility to configure folders for "external" modules ([#444], thanks [@zloirock])
import/external-module-folders setting]: a possibility to configure folders for "external" modules ([#444], thanks [@zloirock])[newline-after-import] exception for switch branches with requires iff parsed as sourceType:'module'. (still [#441], thanks again [@ljharb])
newline-after-import] exception for switch branches with requires iff parsed as sourceType:'module'.
(still [#441], thanks again [@ljharb])Added an peerDependencies option to [no-extraneous-dependencies] to allow/forbid peer dependencies ([#423], [#428], thanks [@jfmengels]!).
peerDependencies option to [no-extraneous-dependencies] to allow/forbid peer dependencies ([#423], [#428], thanks [@jfmengels]!).newline-after-import] exception for multiple requires in an arrow
function expression (e.g. () => require('a') || require('b')). ([#441], thanks [@ljharb])removing Symbol dependencies (i.e. for-of loops) due to Node 0.10 polyfill issue (see [#415]). Should not make any discernible semantic difference.
Symbol dependencies (i.e. for-of loops) due to Node 0.10 polyfill
issue (see [#415]). Should not make any discernible semantic difference.Something horrible happened during npm prepublish of 1.10.1. Several rm -rf node_modules && npm i and gulp clean && npm prepublishs later, it is rebui
npm prepublish of 1.10.1.
Several rm -rf node_modules && npm i and gulp clean && npm prepublishs later, it is rebuilt and republished as 1.10.2. Thanks [@rhettlivingston] for noticing and reporting!Added new rule [no-restricted-paths]. ([#155]/[#371], thanks [@lo1tuma])
no-restricted-paths]. ([#155]/[#371], thanks [@lo1tuma])import/core-modules setting]: allow configuration of additional module names,
to be treated as builtin modules (a la path, etc. in Node). ([#275] + [#365], thanks [@sindresorhus] for driving)newline-after-import related to the use of switch cases. (fixes [#386], thanks [@ljharb] for reporting) ([#395])Issues with ignored/CJS files in [export] and [no-deprecated] rules. ([#348], [#370], thanks [@sohkai] and [@wKich])
export] and [no-deprecated] rules. ([#348], [#370], thanks [@sohkai] and [@wKich])Reordered precedence for loading resolvers. ([#373], thanks [@benmosher])
Added support TomDoc comments to [no-deprecated]. ([#321], thanks [@josh])
no-deprecated]. ([#321], thanks [@josh])prefer-default-export] handles export function and export const in same file ([#359], thanks [@scottnonnenberg])export * from 'foo' now properly ignores a default export from foo, if any. ([#328]/[#332], thanks [@jkimbo]) This impacts all static analysis of impo
export * from 'foo' now properly ignores a default export from foo, if any. ([#328]/[#332], thanks [@jkimbo])
This impacts all static analysis of imported names. ([default], [named], [namespace], [export])order]'s newline-between option handle multiline import statements ([#313], thanks [@singles])order]'s newline-between option handle not assigned import statements ([#313], thanks [@singles])order]'s newline-between option ignore require statements inside object literals ([#313], thanks [@singles])prefer-default-export] properly handles deep destructuring, export * from ..., and files with no exports. ([#342]+[#343], thanks [@scottnonnenberg])[prefer-default-export], new rule. ([#308], thanks [@gavriguy])
prefer-default-export], new rule. ([#308], thanks [@gavriguy])no-mutable-exports]. ([#317], fixed by [#322]. thanks [@borisyankov] + [@jfmengels])no-extraneous-dependencies] handle scoped packages ([#316], thanks [@jfmengels])[newline-after-import], new rule. ([#245], thanks [@singles])
newline-after-import], new rule. ([#245], thanks [@singles])optionalDependencies option to [no-extraneous-dependencies] to allow/forbid optional dependencies ([#266], thanks [@jfmengels]).newlines-between option to [order] rule ([#298], thanks [@singles])no-mutable-exports] rule ([#290], thanks [@josh])import/extensions setting]: a list of file extensions to parse as modules
and search for exports. If unspecified, all extensions are considered valid (for now).
In v2, this will likely default to ['.js', MODULE_EXT]. ([#297], to fix [#267])extensions]: fallback to source path for extension enforcement if imported
module is not resolved. Also, never report for builtins (i.e. path). ([#296])[no-named-as-default-member]: don't crash on rest props. ([#281], thanks [@SimenB])
no-named-as-default-member]: don't crash on rest props. ([#281], thanks [@SimenB])null to path functions.
Thanks to [@strawbrary] for bringing this up ([#272]) and adding OSX support to the Travis
config ([#288]).add [no-named-as-default-member] to warnings canned config
no-named-as-default-member] to warnings canned configno-extraneous-dependencies] rule ([#241], thanks [@jfmengels])extensions] rule ([#250], thanks [@lo1tuma])no-nodejs-modules] rule ([#261], thanks [@jfmengels])order] rule ([#247], thanks [@jfmengels])resolve.fallback config option in the webpack resolver ([#254], thanks [@yp])imports-first] now allows directives (i.e. 'use strict') strictly before
any imports ([#256], thanks [@lemonmade])named] now properly ignores the source module if a name is re-exported from
an ignored file (i.e. node_modules). Also improved the reported error. (thanks to [@jimbolla] for reporting)no-named-as-default-member] had a crash on destructuring in loops (thanks for heads up from [@lemonmade])report resolver errors at the top of the linted file
no-namespace] rule ([#239], thanks [@singles])no-named-as-default-member] rule ([#243], thanks [@dmnd])es6-* ponyfills. Using native Map/Set/Symbol.Resolver plugin interface v2: more explicit response format that more clearly covers the found-but-core-module case, where there is no path. Still bac
package.json/files instead of .npmignore for package file inclusion ([#228], thanks [@mathieudutour])es6-* ponyfills instead of babel-runtimeMajor perf improvements. Between parsing only once and ignoring gigantic, non-module node_modules, there is very little added time.
Major perf improvements. Between parsing only once and ignoring gigantic, non-module node_modules,
there is very little added time.
My test project takes 17s to lint completely, down from 55s, when using the
memoizing parser, and takes only 27s with naked babel-eslint (thus, reparsing local modules).
import/ignore setting] if
something that looks like an export is detected in the module content.Thanks @lencioni for identifying a huge amount of rework in resolve and kicking off a bunch of memorization.
Thanks @lencioni for identifying a huge amount of rework in resolve and kicking off a bunch of memorization.
I'm seeing 62% improvement over my normal test codebase for just no-unresolved in isolation, and ~35% total reduction in lint time.
Thanks [@lencioni] for identifying a huge amount of rework in resolve and kicking off a bunch of memoization.
I'm seeing 62% improvement over my normal test codebase when executing only
[no-unresolved] in isolation, and ~35% total reduction in lint time.
import/cache setting]added an ignore option to no-unresolved for those pesky files for which no resolver can find. (still prefer enhancing the Webpack and Node resolvers t
ignore option to no-unresolved for those pesky files for which no resolver can find. (still prefer enhancing the Webpack and Node resolvers to using it, though)ignore option to [no-unresolved] for those pesky files that no resolver can find. (still prefer enhancing the Webpack and Node resolvers to using it, though). See [#89] for details (thanks [@jbe456]).1.0.3: no-deprecated follows deep namespaces
1.0.2:
fix #192
1.0.3:
no-deprecated follows deep namespaces (#191)
1.0.4:
don't crash on self references (#210)
correct cache behavior in eslint_d for deep namespaces (#200)
respect hoisting for deep namespaces (namespace/no-deprecated) (#211)
namespace no longer flags modules with only a default export as having no names. (ns.default is valid ES6)
namespace]/[no-deprecated]) ([#211], thanks [@benmosher])eslint_d for deep namespaces ([#200], thanks [@benmosher])namespace]/[no-deprecated]) ([#211])eslint_d for deep namespaces ([#200])no-deprecated follows deep namespaces ([#191], thanks [@benmosher])
namespace] no longer flags modules with only a default export as having no names. (ns.default is valid ES6)don't parse imports with no specifiers ([#192], thanks [@steida])
deep namespaces are traversed regardless of how they get imported
stage-0 shared config (#188)no-deprecatedstage-0 shared configno-deprecated]import/no-deprecated: WIP rule to let you know at lint time if you're using deprecated functions, constants, classes, or modules.
import/namespace: support deep namespaces #119 via #157import/no-deprecated: WIP rule to let you know at lint time if you're using deprecated functions, constants, classes, or modules.From the beta 1.0 release notes:
Update, verified to work with ESLint 2.0.
"Breaking" changes from 0.13.0:
no longer needs/refers to import/parser or import/parse-options. instead, ESLint provided the configured parser + options to the rules, and they use that to parse dependencies.
Shouldn't hurt to leave it there, and I suspect 99.999% of installs have import/parser === parser.
This also means the plugin uses espree instead of babylon if no parser is configured. Wouldn't expect this to hurt in general, but it is a potentially breaking difference.
eslint-config-import is no longer supported. Instead, use the shared configs directly exported by the plugin. See the README for details.
Nothing groundbreaking, but import/parser has been a thorny issue for the whole life of the plugin, and I'm glad to finally be rid of it. :sweat_smile:
no-deprecated]: WIP rule to let you know at lint time if you're using deprecated functions, constants, classes, or modules.namespace]: support deep namespaces ([#119] via [#157], thanks [@benmosher])Update, verified to work with ESLint 2.0.
Update, verified to work with ESLint 2.0.
"Breaking" changes from 0.13.0:
no longer needs/refers to import/parser or import/parse-options. instead, ESLint provided the configured parser + options to the rules, and they use that to parse dependencies.
Shouldn't hurt to leave it there, and I suspect 99.999% of installs have import/parser === parser.
This also means the plugin uses espree instead of babylon if no parser is configured. Wouldn't expect this to hurt in general, but it is a potentially breaking difference.
eslint-config-import is no longer supported. Instead, use the shared configs directly exported by the plugin. See the README for details.
Nothing groundbreaking, but import/parser has been a thorny issue for the whole life of the plugin, and I'm glad to finally be rid of it. :sweat_smile:
import/parser or import/parse-options. Instead, ESLint provides the configured parser + options to the rules, and they use that to parse dependencies.babylon as default import parser (see Breaking)no-commonjs and no-amd rules added. (thanks @xjamundx for donating code to get these going)
no-commonjs and no-amd rules added. (thanks @xjamundx for donating code to get these going)
no-commonjs] ruleno-amd] ruleno-require rule. [no-commonjs] is more complete.Moved rule details into separate files, so the README is shorter and does not distract from config settings (resolvers, import/parser, etc.).
Moved rule details into separate files, so the README is shorter and does not distract from config settings (resolvers, import/parser, etc.).
No code changes, should be functionally identical to v0.12.0.
Ignore import/ignore if exports are actually found in the parsed module. Does this to support use of jsnext:main in node_modules without the pain of m
import/ignore if exports are actually found in the parsed module.
Does this to support use of jsnext:main in node_modules without the pain of managing a whitelist or a nuanced blacklist. May be removed pending how surprising/helpful it ends up being.import/ignore setting] if exports are actually found in the parsed module. Does this to support use of jsnext:main in node_modules without the pain of managing an allow list or a nuanced deny list.Resolver plugins: now the linter can read Webpack config, properly follow aliases and ignore externals, dismisses inline loaders, etc. etc.!
Resolver plugins: now the linter can read Webpack config, properly follow aliases and ignore externals, dismisses inline loaders, etc. etc.!
cache correctness: should properly re-load changed files even in a long lived process (like a webpack dev server)
ecmaFeatures.jsx was broken when ESLint froze the context and settings. My own fault... not very hygienic to mutate shared state in the first place.Breaking: removed no-errors rule. Instead, each individual rule will report parse errors in the target imported file, if encountered.
Breaking: removed no-errors rule. Instead, each individual rule will report parse errors in the target imported file, if encountered.
#90: Added {commonjs: [bool], amd: [bool]} option object to no-unresolved. If set true, will attempt to resolve module paths for CommonJS require and AMD define + require in a limited set of cases. Not nearly so smart as Webpack, but smart enough to be useful. (hopefully.) Thanks @mctep for changing my mind on this. 😁
#94: Dependency parser will infer 'jsx' plugin if using default Babylon and jsx is asserted in the ecmaFeatures. Thanks @jameslnewell for bringing this up.
#88: un-smarted no-require. It will now report on all require statements, everywhere, regardless of target.
Internal parser is now Babylon (6) by default (so generally, you can remove babel-eslint as import/parser)
babel-eslint as import/parser)import/warnings to get previous defaults:---
extends:
- 'eslint:recommended' # or your favorite base config
- import/warnings # or just `import` if you want only the basics
- import/es7-jsx # will configure the parser for stage 1 ES7 syntax + JSX
Both import/warnings and import/es7-jsx extend the base import config, so you only need to mention it explicitly if you want only the basic config. All 3 will set plugins: - import for you, too.
import/parse-options setting allows custom configuration options for Babylon, or whatever parser package you specified with import/parserNothing published for this version
no-require is now enforced on core, npm, and unresolved packages. It is still disabled by default. Thanks, @lightsofapollo!
no-require is now enforced on core, npm, and unresolved packages. It is still disabled by default. Thanks, @lightsofapollo!Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
added export rule to head off the import problems at the source
export rule to head off the import problems at the sourcecustom parser via import/parser setting
• custom parser via import/parser setting (#38)
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
fixed issue where no-reassign crashed on unnamed default exports
no-reassign crashed on unnamed default exports (#29)Nothing published for this version
no-reassign: fixed a crash for array destructuring with omitted positions (i.e. let [/*missing*/, present] = [4, 2])
no-reassign: fixed a crash for array destructuring with omitted positions (i.e. let [/*missing*/, present] = [4, 2])eslint-import-core package (#25)- adds rule from #23 - some minor cleaning - removed estraverse dependency
estraverse dependencyPackage tests to prevent rules from being forgotten from index.
no-require rule.Removed no-common in favor of enforcing that all imports have ES6 modules behind them.
no-common in favor of enforcing that all imports have ES6 modules behind them. (#20)resolve.root setting allows module resolution to start from some arbitrary path within your package, instead of just relative paths and node_modules. (#18)Your coding agent can read these notes before it upgrades. Set up the MCP server →