All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning. This change log adheres to standards from Keep a CHANGELOG.
dynamic-import-chunkname
: addallowEmpty
option to allow empty leading comments (#2942, thanks @JiangWeixian)dynamic-import-chunkname
: Allow empty chunk name when webpackMode: 'eager' is set; add suggestions to remove name in eager mode (#3004, thanks @amsardesai)no-unused-modules
: AddignoreUnusedTypeExports
option (#3011, thanks @silverwind)- add support for Flat Config (#3018, thanks @michaelfaith)
no-extraneous-dependencies
: allow wrong path (#3012, thanks @chabb)no-cycle
: use scc algorithm to optimize (#2998, thanks @soryy708)no-duplicates
: Removing duplicates breaks in TypeScript (#3033, thanks @yesl-kim)newline-after-import
: fix considerComments option when require (#2952, thanks @developer-bandi)
- [Docs]
no-extraneous-dependencies
: Make glob pattern description more explicit (#2944, thanks @mulztob) no-unused-modules
: add console message to help debug #2866- [Refactor]
ExportMap
: make procedures static instead of monkeypatching exportmap (#2982, thanks @soryy708) - [Refactor]
ExportMap
: separate ExportMap instance from its builder logic (#2985, thanks @soryy708) - [Docs]
order
: Add a quick note on how unbound imports and --fix (#2640, thanks @minervabot) - [Tests] appveyor -> GHA (run tests on Windows in both pwsh and WSL + Ubuntu) (#2987, thanks @joeyguerra)
- [actions] migrate OSX tests to GHA (ljharb#37, thanks @aks-)
- [Refactor]
exportMapBuilder
: avoid hoisting (#2989, thanks @soryy708) - [Refactor]
ExportMap
: extract "builder" logic to separate files (#2991, thanks @soryy708) - [Docs]
order
: update the description of thepathGroupsExcludedImportTypes
option (#3036, thanks @liby)
2.29.1 - 2023-12-14
no-extraneous-dependencies
: ignoreexport type { ... } from '...'
whenincludeTypes
isfalse
(#2919, thanks @Pandemic1617)no-unused-modules
: support export patterns with array destructuring (#2930, thanks @ljharb)- [Deps] update
tsconfig-paths
(#2447, thanks @domdomegg)
2.29.0 - 2023-10-22
- TypeScript config: add .cts and .mts extensions (#2851, thanks @Zamiell)
newline-after-import
: new optionexactCount
and docs update ([#1933], thanks [@anikethsaha] and [@reosarevok])newline-after-import
: fixexactCount
withconsiderComments
false positive, when there is a leading comment (#2884, thanks @kinland)
2.28.1 - 2023-08-18
2.28.0 - 2023-07-27
no-duplicates
: remove duplicate identifiers in duplicate imports (#2577, thanks @joe-matsec)consistent-type-specifier-style
: fix accidental removal of comma in certain cases (#2754, thanks @bradzacher)- [Perf]
ExportMap
: ImproveExportMap.for
performance on larger codebases (#2756, thanks @leipert) no-extraneous-dependencies
/TypeScript: do not error when importing inline type from dev dependencies (#1820, thanks @andyogo)newline-after-import
/TypeScript: do not error when re-exporting a namespaced import (#2832, thanks @laurens-dg)order
: partial fix for #2687 (thanks @ljharb)no-duplicates
: Detect across type and regular imports (#2835, thanks @benkrejci)extensions
: handle.
and..
properly (#2778, thanks @benasher44)no-unused-modules
: improve schema (thanks @ljharb)no-unused-modules
: report error on binding instead of parent export (#2842, thanks @Chamion)
- [Docs]
no-duplicates
: fix example schema (#2684, thanks @simmo) - [Docs]
group-exports
: fix syntax highlighting (#2699, thanks @devinrhode2) - [Docs]
extensions
: reference node ESM behavior (#2748, thanks @xM8WVqaG) - [Refactor]
exports-last
: usearray.prototype.findlastindex
(thanks @ljharb) - [Refactor]
no-anonymous-default-export
: useobject.fromentries
(thanks @ljharb) - [Refactor]
no-unused-modules
: usearray.prototype.flatmap
(thanks @ljharb)
2.27.5 - 2023-01-16
- [
order]
: Fix group ranks order when alphabetizing (#2674, thanks @Pearce-Ropion)
2.27.4 - 2023-01-11
semver
should be a prod dep (#2668)
2.27.3 - 2023-01-11
no-empty-named-blocks
: rewrite rule to only check import declarations (#2666)
2.27.2 - 2023-01-11
no-duplicates
: do not unconditionally requiretypescript
(#2665)
2.27.1 - 2023-01-11
array.prototype.flatmap
should be a prod dep (#2664, thanks @cristobal)
2.27.0 - 2023-01-11
newline-after-import
: addconsiderComments
option (#2399, thanks @pri1311)no-cycle
: addallowUnsafeDynamicCyclicDependency
option (#2387, thanks [@GerkinDev])no-restricted-paths
: support arrays forfrom
andtarget
options (#2466, thanks @AdriAt360)no-anonymous-default-export
: addallowNew
option ([#2505], thanks @DamienCassou)order
: AdddistinctGroup
option (#2395, thanks @hyperupcall)no-extraneous-dependencies
: AddincludeInternal
option (#2541, thanks [@bdwain])no-extraneous-dependencies
: AddincludeTypes
option ([#2543], thanks [@bdwain])order
: newalphabetize.orderImportKind
option to sort imports with same path based on their kind (type
,typeof
) ([#2544], thanks @stropho)consistent-type-specifier-style
: add rule (#2473, thanks @bradzacher)- Add
no-empty-named-blocks
rule (#2568, thanks @guilhermelimak) prefer-default-export
: add "target" option (#2602, thanks @azyzz228)no-absolute-path
: add fixer (#2613, thanks [@adipascu])no-duplicates
: support inline type import withinlineTypeImport
option (#2475, thanks @snewcomer)
order
: move nested imports closer to main import entry (#2396, thanks @pri1311)no-restricted-paths
: fix an error message (#2466, thanks @AdriAt360)no-restricted-paths
: useMinimatch.match
instead ofminimatch
to comply with Windows Native paths (#2466, thanks @AdriAt360)order
: require with member expression could not be fixed if alphabetize.order was used (#2490, thanks @msvab)order
: leave more space in rankings for consecutive path groups (#2506, thanks @Pearce-Ropion)no-cycle
: add ExportNamedDeclaration statements to dependencies (#2511, thanks @BenoitZugmeyer)dynamic-import-chunkname
: prevent false report on a valid webpack magic comment (#2330, thanks @mhmadhamster)export
: do not error on TS export overloads (#1590, thanks @ljharb)no-unresolved
,extensions
: ignore type only exports (#2436, thanks @Lukas-Kullmann)ExportMap
: add missing param to function (#2589, thanks @Fdawgs)no-unused-modules
:checkPkgFieldObject
filters boolean fields from checks (#2598, thanks @mpint)no-cycle
: accept Flowtypeof
imports, just liketype
(#2608, thanks @gnprice)no-import-module-exports
: avoid a false positive for import variables (#2315, thanks @BarryThePenguin)
- [Tests]
named
: Run all TypeScript test (#2427, thanks @ProdigySim) - [readme] note use of typescript in readme
import/extensions
section (#2440, thanks @OutdatedVersion) - [Docs]
order
: use correct default value (#2392, thanks @hyperupcall) - [meta] replace git.io link in comments with the original URL (#2444, thanks @liby)
- [Docs] remove global install in readme (#2412, thanks @aladdin-add)
- [readme] clarify
eslint-import-resolver-typescript
usage (#2503, thanks @JounQin) - [Refactor]
no-cycle
: Add per-run caching of traversed paths (#2419, thanks [@nokel81]) - [Performance]
ExportMap
: add caching after parsing for an ambiguous module (#2531, thanks @stenin-nikita) - [Docs]
no-useless-path-segments
: fix paths (#2424, thanks @s-h-a-d-o-w) - [Tests]
no-cycle
: add passing test cases (#2438, thanks @georeith) - [Refactor]
no-extraneous-dependencies
improve performance using cache (#2374, thanks @meowtec) - [meta]
CONTRIBUTING.md
: mention inactive PRs (#2546, thanks @stropho) - [readme] make json for setting groups multiline (#2570, thanks @bertyhell)
- [Tests]
no-restricted-paths
: Tests forimport type
statements (#2459, thanks @golergka) - [Tests]
no-restricted-paths
: fix one failingimport type
test case, submitted by @golergka, thanks @azyzz228 - [Docs] automate docs with eslint-doc-generator (#2582, thanks @bmish)
- [readme] Increase clarity around typescript configuration (#2588, thanks @Nfinished)
- [Docs] update
eslint-doc-generator
to v1.0.0 (#2605, thanks @bmish) - [Perf]
no-cycle
,no-internal-modules
,no-restricted-paths
: useanyOf
instead ofoneOf
(thanks @ljharb, @remcohaszing)
2.26.0 - 2022-04-05
no-named-default
,no-default-export
,prefer-default-export
,no-named-export
,export
,named
,namespace
,no-unused-modules
: support arbitrary module namespace names (#2358, thanks @sosukesuzuki)no-dynamic-require
: support dynamic import with espree (#2371, thanks @sosukesuzuki)no-relative-packages
: add fixer (#2381, thanks @forivall)
default
:typescript-eslint-parser
: avoid a crash on exporting as namespace (thanks @ljharb)export
/TypeScript: false positive for typescript namespace merging ([#1964], thanks @magarcia)no-duplicates
: ignore duplicate modules in different TypeScript module declarations (#2378, thanks @remcohaszing)no-unused-modules
: avoid a crash when processing re-exports (#2388, thanks @ljharb)
- [Tests]
no-nodejs-modules
: add tests for node protocol URL (#2367, thanks @sosukesuzuki) - [Tests]
default
,no-anonymous-default-export
,no-mutable-exports
,no-named-as-default-member
,no-named-as-default
: add tests for arbitrary module namespace names (#2358, thanks @sosukesuzuki) - [Docs]
no-unresolved
: Fix RegExp escaping in readme (#2332, thanks @stephtr) - [Refactor]
namespace
: try to improve performance (#2340, thanks @ljharb) - [Docs] make rule doc titles consistent (#2393, thanks @TheJaredWilcurt)
- [Docs]
order
: TS code examples should use TS code blocks (#2411, thanks [@MM25Zamanian]) - [Docs]
no-unresolved
: fix link (#2417, thanks @kylemh)
2.25.4 - 2022-01-02
importType
: avoid crashing on a non-string' (#2305, thanks @ljharb)first
: prevent crash when parsing angular templates (#2210, thanks @ljharb)importType
: properly resolve@/*
-aliased imports as internal (#2334, thanks @ombene)named
/ExportMap
: handle named imports from CJS modules that use dynamic import (#2341, thanks @ludofischer)
- [
no-default-import
]: report on the token "default" instead of the entire node (#2299, thanks @pmcelhaney) - [Docs]
order
: Remove duplicate mention of default (#2280, thanks @johnthagen) - [Deps] update
eslint-module-utils
2.25.3 - 2021-11-09
extensions
: ignore unresolveable type-only imports (#2270, #2271, thanks @jablko)importType
: fixisExternalModule
calculation (#2282, thanks @mx-bernhard)no-import-module-exports
: avoid false positives with a shadowedmodule
orexports
(#2297, thanks @ljharb)
- [Docs]
order
: add type to the default groups (#2272, thanks @charpeni) - [readme] Add note to TypeScript docs to install appropriate resolver (#2279, thanks @johnthagen)
- [Refactor]
importType
: combine redundantisScoped
andisScopedModule
(thanks @ljharb) - [Docs] HTTP => HTTPS (#2287, thanks @Schweinepriester)
2.25.2 - 2021-10-12
2.25.1 - 2021-10-11
- [Deps] update
eslint-module-utils
2.25.0 - 2021-10-11
- Support
eslint
v8 (#2191, thanks @ota-meshi) no-unresolved
: addcaseSensitiveStrict
option (#1262, thanks @sergei-startsev)no-unused-modules
: add eslint v8 support (#2194, thanks [@coderaiser])no-restricted-paths
: add/restore glob pattern support (#2219, thanks @stropho)no-unused-modules
: support dynamic imports (#1660, #2212, thanks @maxkomarychev, @aladdin-add, @Hypnosphi)
no-unresolved
: ignore type-only imports (#2220, thanks @jablko)order
: fix sorting imports inside TypeScript module declarations (#2226, thanks @remcohaszing)default
,ExportMap
: Resolve extended TypeScript configuration files (#2240, thanks @mrmckeb)
- [Refactor] switch to an internal replacement for
pkg-up
andread-pkg-up
(#2047, thanks @mgwalker) - [patch] TypeScript config: remove
.d.ts
fromimport/parsers
setting andimport/extensions
setting (#2220, thanks @jablko) - [Refactor]
no-unresolved
,no-extraneous-dependencies
: moduleVisitor usage (#2233, thanks @jablko)
2.24.2 - 2021-08-24
2.24.1 - 2021-08-19
ExportMap
: Add default export when esModuleInterop is true and anything is exported (#2184, thanks @Maxim-Mazurok)named
,namespace
: properly set reexports onexport * as … from
(#1998, #2161, thanks @ljharb)no-duplicates
: correctly handle case of mixed default/named type imports (#2149, thanks @GoodForOneFare, @nwalters512)no-duplicates
: avoid crash with emptyimport type {}
(#2201, thanks @ljharb)
- [Docs]
max-dependencies
: 📖 DocumentignoreTypeImports
option (#2196, thanks @himynameisdave)
2.24.0 - 2021-08-08
no-dynamic-require
: add optionesmodule
(#1223, thanks @vikr01)named
: addcommonjs
option (#1222, thanks @vikr01)no-namespace
: Addignore
option (#2112, thanks @aberezkin)max-dependencies
: add optionignoreTypeImports
(#1847, thanks @rfermann)
no-duplicates
: ensure autofix avoids excessive newlines (#2028, thanks @ertrzyiks)extensions
: avoid crashing on partially typed import/export statements (#2118, thanks @ljharb)no-extraneous-dependencies
: add ESM intermediate package.json support (#2121, thanks @paztis)- Use
context.getPhysicalFilename()
when available (ESLint 7.28+) (#2160, thanks @pmcelhaney) extensions
/importType
: fix isScoped treating @/abc as scoped module (#2146, thanks @rperello)
- [Docs]
extensions
: improved cases for using@/...
(#2140, thanks @wenfangdu) - [Docs]
extensions
: removed incorrect cases (#2138, thanks @wenfangdu) - [Tests]
order
: add tests forpathGroupsExcludedImportTypes: ['type']
(#2158, thanks @atav32) - [Docs]
order
: improve the documentation for thepathGroupsExcludedImportTypes
option (#2156, thanks @liby) - [Tests]
no-cycle
: Restructure test files (#1517, thanks @soryy708) - [Docs] add description how to use plugin with yarn berry (#2179, thanks @KostyaZgara)
2.23.4 - 2021-05-29
no-import-module-exports
: Don't crash if packages have no entrypoint (#2099, thanks @eps1lon)no-extraneous-dependencies
: fix package name algorithm (#2097, thanks @paztis)
2.23.3 - 2021-05-21
no-restricted-paths
: fix false positive matches (#2090, thanks @malykhinvi)no-cycle
: ignore imports where imported file only imports types of importing file (#2083, thanks @cherryblossom000)no-cycle
: fix false negative when file imports a type after importing a value in Flow (#2083, thanks @cherryblossom000)order
: restore default behavior unlesstype
is in groups (#2087, thanks @grit96)
- [Docs] Add
no-relative-packages
to list of to the list of rules (#2075, thanks @arvigeus)
2.23.2 - 2021-05-15
- [meta] add
safe-publish-latest
; useprepublishOnly
script for npm 7+
2.23.1 - 2021-05-14
newline-after-import
: fix crash withexport {}
syntax (#2063, #2056, thanks @ljharb)ExportMap
: do not crash when tsconfig lacks.compilerOptions
(#2067, thanks @ljharb)order
: fix alphabetical sorting (#2071, thanks @grit96)
2.23.0 - 2021-05-13
no-commonjs
: Also detect require calls with expressionless template literals:require(`x`)
(#1958, thanks @FloEdelmann)no-internal-modules
: Addforbid
option (#1846, thanks @guillaumewuip)- add
no-relative-packages
(#1860, #966, thanks @tapayne88 @panrafal) - add
no-import-module-exports
rule: report import declarations with CommonJS exports (#804, thanks @kentcdodds and @ttmarek) no-unused-modules
: Support destructuring assignment forexport
. (#1997, thanks @s-h-a-d-o-w)order
: support type imports (#2021, thanks @grit96)order
: AddwarnOnUnassignedImports
option to enable warnings for out of order unassigned imports (#1990, thanks @hayes)
export
/TypeScript: properly detect export specifiers as children of a TS module block (#1889, thanks @andreubotella)order
: ignore non-module-level requires (#1940, thanks @golopot)no-webpack-loader-syntax
/TypeScript: avoid crash on missing name (#1947, thanks @leonardodino)no-extraneous-dependencies
: Add package.json cache (#1948, thanks @fa93hws)prefer-default-export
: handle empty array destructuring (#1965, thanks @ljharb)no-unused-modules
: make type imports mark a module as used (fixes #1924) (#1974, thanks @cherryblossom000)no-cycle
: fix perf regression (#1944, thanks @Blasz)first
: fix handling ofimport = require
([#1963], thanks @MatthiasKunnen)no-cycle
/extensions
: fix isExternalModule usage (#1696, thanks @paztis)extensions
/no-cycle
/no-extraneous-dependencies
: Correct module real path resolution (#1696, thanks @paztis)no-named-default
: ignore Flow import type and typeof (#1983, thanks @christianvuerings)no-extraneous-dependencies
: Exclude flowtypeof
imports (#1534, thanks @devongovett)newline-after-import
: respect decorator annotations (#1985, thanks @lilling)no-restricted-paths
: enhance performance for zones withexcept
paths (#2022, thanks @malykhinvi)no-unresolved
: check import() (#2026, thanks @aladdin-add)
- [Generic Import Callback] Make callback for all imports once in rules (#1237, thanks @ljqx)
- [Docs]
no-named-as-default
: add semicolon (#1897, thanks @bicstone) - [Docs]
no-extraneous-dependencies
: correct peerDependencies option default totrue
(#1993, thanks @dwardu) - [Docs]
order
: Document options required to match ordering example ([#1992], thanks @silviogutierrez) - [Tests]
no-unresolved
: add tests forimport()
(#2012, thanks @davidbonnet) - [Docs] Add import/recommended ruleset to README (#2034, thanks @edemaine)
2.22.1 - 2020-09-27
default
/TypeScript: avoid crash onexport =
with a MemberExpression (#1841, thanks @ljharb)extensions
/importType: Fix @/abc being treated as scoped module (#1854, thanks @3nuc)- allow using rest operator in named export (#1878, thanks @foray1010)
dynamic-import-chunkname
: allow single quotes to match Webpack support (#1848, thanks @straub)
2.22.0 - 2020-06-26
no-unused-modules
: consider exported TypeScript interfaces, types and enums (#1819, thanks @nicolashenry)no-cycle
: allowmaxDepth
option to be"∞"
(thanks @ljharb)
order
/TypeScript: properly supportimport = object
expressions (#1823, thanks @manuth)no-extraneous-dependencies
/TypeScript: do not error when importing type from dev dependencies (#1820, thanks @fernandopasik)default
: avoid crash withexport =
(#1822, thanks @AndrewLeedham)order
/newline-after-import
: ignore TypeScript's "export import object" (#1830, thanks @be5invis)dynamic-import-chunkname
/TypeScript: supports@typescript-eslint/parser
(#1833, thanks @noelebrun)order
/TypeScript: ignore ordering of object imports (#1831, thanks @manuth)namespace
: do not report on shadowed import names (#518, thanks @ljharb)export
: avoid warning onexport * as
non-conflicts (#1834, thanks @ljharb)
no-extraneous-dependencies
: add tests for importing types (#1824, thanks @taye)- [docs]
no-default-export
: Fix docs url (#1836, thanks @beatrizrezener) - [docs]
imports-first
: deprecation info and link tofirst
docs (#1835, thanks @beatrizrezener)
2.21.2 - 2020-06-09
order
: avoid a crash on TypeScript’sexport import
syntax (#1808, thanks @ljharb)newline-after-import
: consider TypeScriptimport =
syntax' (#1811, thanks @ljharb)no-internal-modules
: avoid a crash on a named export declaration (#1814, thanks @ljharb)
2.21.1 - 2020-06-07
2.21.0 - 2020-06-07
- [
import/default
]: support default export in TSExportAssignment (#1528, thanks @joaovieira) no-cycle
: addignoreExternal
option (#1681, thanks @sveyret)order
: Add support for TypeScript's "import equals"-expressions (#1785, thanks @manuth)- [
import/default
]: support default export in TSExportAssignment (#1689, thanks @Maxim-Mazurok) no-restricted-paths
: add custom message support (#1802, thanks @malykhinvi)
group-exports
: Flow type export awareness (#1702, thanks @ernestostifano)order
: Recognize pathGroup config for first group (#1719, #1724, thanks @forivall, @xpl)no-unused-modules
: Fix re-export not counting as usage when used in combination with import (#1722, thanks @Ephem)no-duplicates
: Handle TS import type (#1676, thanks @kmui2)newline-after-import
: recognize decorators (#1139, thanks @atos1990)no-unused-modules
: Revert "[flow]no-unused-modules
: add flow type support" (#1770, thanks @Hypnosphi)- TypeScript: Add nested namespace handling (#1763, thanks @julien1619)
namespace
/ExportMap
: Fix interface declarations for TypeScript (#1764, thanks @julien1619)no-unused-modules
: avoid order-dependence (#1744, thanks @darkartur)no-internal-modules
: also checkexport from
syntax (#1691, thanks @adjerbetian)- TypeScript:
export
: avoid a crash withexport =
(#1801, thanks @ljharb)
- [Refactor]
no-extraneous-dependencies
: use moduleVisitor (#1735, thanks @adamborowski) - TypeScript config: Disable
named
(#1726, thanks @astorije) - [readme] Remove duplicate
no-unused-modules
from docs (#1690, thanks @arvigeus) - [Docs]
order
: fix bad inline config (#1788, thanks @nickofthyme) - [Tests] Add fix for Windows Subsystem for Linux (#1786, thanks @manuth)
- [Docs] [
no-unused-rules
]: Fix docs for unused exports (#1776, thanks @barbogast) - [eslint] bump minimum v7 version to v7.2.0
order
: fixisExternalModule
detect on windows (#1651, thanks @fisker)order
: recognize ".." as a "parent" path (#1658, thanks @golopot)no-duplicates
: fix fixer on cases with default import (#1666, thanks @golopot)no-unused-modules
: Handleexport { default } from
syntax (#1631, thanks @richardxia)first
: Add a way to disableabsolute-first
explicitly (#1664, thanks @TheCrueltySage)- [Docs]
no-webpack-loader-syntax
: Updates webpack URLs (#1751, thanks @MikeyBeLike)
2.20.1 - 2020-02-01
export
: Handle function overloading in*.d.ts
(#1619, thanks @IvanGoncharov)no-absolute-path
: fix a crash with invalid import syntax (#1616, thanks @ljharb)import/external-module-folders
setting now correctly works with directories containing modules symlinked fromnode_modules
(#1605, thanks @skozin)extensions
: for invalid code wherename
does not exist, do not crash (#1613, thanks @ljharb)extensions
: Fix scope regex (#1611, thanks @yordis)no-duplicates
: allow duplicate imports if one is a namespace and the other not (#1612, thanks @sveyret)- Add some missing rule meta schemas and types (#1620, thanks @bmish)
named
: for importing from a module which re-exports named exports from anode_modules
module (#1569, #1447, thanks @redbugz, @kentcdodds)order
: Fix alphabetize for mixed requires and imports (#1626, thanks @wschurman)
import/external-module-folders
setting behavior is more strict now: it will only match complete path segments (#1605, thanks @skozin)- [meta] fix "files" field to include/exclude the proper files (#1635, thanks @ljharb)
- [Tests]
order
: Add TS import type tests (#1736, thanks @kmui2)
2.20.0 - 2020-01-10
order
: addedcaseInsensitive
as an additional option toalphabetize
(#1586, thanks @dbrewer5)no-restricted-paths
: Newexcept
option perzone
, allowing exceptions to be defined for a restricted zone (#1238, thanks @rsolomon)order
: add option pathGroupsExcludedImportTypes to allow ordering of external import types (#1565, thanks @Mairu)
no-unused-modules
: fix usage ofimport/extensions
setting (#1560, thanks @stekycz)extensions
: ignore non-main modules (#1563, thanks @saschanaz)- TypeScript config: lookup for external modules in @types folder (#1526, thanks @joaovieira)
no-extraneous-dependencies
: ensurenode.source
is truthy (#1589, thanks @ljharb)extensions
: Ignore query strings when checking for extensions (#1572, thanks @pcorpet)
extensions
: improveignorePackages
docs (#1248, thanks @ivo-stefchev)
2.19.1 - 2019-12-08
no-extraneous-dependencies
: ensurenode.source
exists
2.19.0 - 2019-12-08
internal-regex
setting: regex pattern for marking packages "internal" (#1491, thanks @Librazy)group-exports
: make aggregate module exports valid (#1472, thanks @atikenny)no-namespace
: Make rule fixable (#1401, thanks @TrevorBurnham)- support
parseForESLint
from custom parser (#1435, thanks @JounQin) no-extraneous-dependencies
: Implement support for bundledDependencies (#1436, thanks @schmidsi))no-unused-modules
: add flow type support (#1542, thanks @rfermann)order
: Adds support for pathGroups to allow ordering by defined patterns (#795, #1386, thanks @Mairu)no-duplicates
: AddconsiderQueryString
option : allow duplicate imports with different query strings (#1107, thanks @pcorpet).order
: Add support for alphabetical sorting of import paths within import groups (#1360, #1105, #629, thanks @duncanbeevers, @stropho, @luczsoma, @randallreedjr)no-commonjs
: addallowConditionalRequire
option (#1439, thanks @Pessimistress)
default
: make error message less confusing (#1470, thanks @golopot)- Improve performance of
ExportMap.for
by only loading paths when necessary. (#1519, thanks @brendo) - Support export of a merged TypeScript namespace declaration (#1495, thanks @benmunro)
order
: fix autofix to not move imports across fn calls (#1253, thanks @tihonove)prefer-default-export
: fix false positive with type export (#1506, thanks @golopot)extensions
: FixignorePackages
to produce errors (#1521, thanks @saschanaz)no-unused-modules
: fix crash due toexport *
(#1496, thanks @Taranys)no-cycle
: should not warn for Flow imports (#1494, thanks @maxmalov)order
: fix@someModule
considered asunknown
instead ofinternal
(#1493, thanks @aamulumi)no-extraneous-dependencies
: Checkexport from
(#1049, thanks @marcusdarmstrong)
no-useless-path-segments
: add docs for optioncommonjs
(#1507, thanks @golopot)
no-unused-modules
/eslint-module-utils
: Avoid superfluous calls and code (#1551, thanks @brettz9)
2.18.2 - 2019-07-19
2.18.1 - 2019-07-18
- Improve parse perf when using
@typescript-eslint/parser
(#1409, thanks @bradzacher) prefer-default-export
: don't warn on TypeAlias & TSTypeAliasDeclaration (#1377, thanks @sharmilajesupaul)no-unused-modules
: Exclude package "main"/"bin"/"browser" entry points (#1404, thanks @rfermann)export
: false positive for TypeScript overloads (#1412, thanks @golopot)
no-extraneous-dependencies
,importType
: remove lodash (#1419, thanks @ljharb)
2.18.0 - 2019-06-24
- Support eslint v6 (#1393, thanks @sheepsteak)
order
: Adds support for correctly sorting unknown types into a single group (#1375, thanks @swernerx)order
: add fixer for destructuring commonjs import (#1372, thanks @golopot)- TypeScript config: add TS def extensions + defer to TS over JS (#1366, thanks @benmosher)
no-unused-modules
: handle ClassDeclaration (#1371, thanks @golopot)
no-cycle
: split code examples so file separation is obvious (#1370, thanks @alex-page)no-named-as-default-member
: update broken link (#1389, thanks @fooloomanzoo)
2.17.3 - 2019-05-23
- [
no-common-js
]: Also throw an error when assigning (#1354, thanks @charlessuh) no-unused-modules
: don't crash when lint file outside src-folder (#1347, thanks @rfermann)no-unused-modules
: makeimport { name as otherName }
work (#1340, #1342, thanks @rfermann)no-unused-modules
: make appveyor tests passing (#1333, thanks @rfermann)named
: ignore Flowtypeof
imports andtype
exports (#1345, thanks @loganfsmyth)- [refactor] fix eslint 6 compat by fixing imports (thank @ljharb)
- Improve support for TypeScript declare structures (#1356, thanks @christophercurrie)
- add missing
no-unused-modules
in README (#1358, thanks @golopot) no-unused-modules
: Indicates usage, plugin defaults to no-op, and add description to main README.md (#1352, thanks @johndevedu)- Document
env
option foreslint-import-resolver-webpack
(#1363, thanks @kgregory)
2.17.2 - 2019-04-16
no-unused-modules
: avoid crash when usingignoreExports
-option (#1331, #1323, thanks @rfermann)no-unused-modules
: make sure that rule with no options will not fail (#1330, #1334, thanks @kiwka)
2.17.1 - 2019-04-13
- require v2.4 of
eslint-module-utils
(#1322)
2.17.0 - 2019-04-13
no-useless-path-segments
: AddnoUselessIndex
option (#1290, thanks @timkraut)no-duplicates
: Add autofix (#1312, thanks @lydell)- Add
no-unused-modules
rule (#1142, thanks @rfermann) - support export type named exports from TypeScript (#1304, thanks @bradennapier and @schmod)
order
: Fix interpreting some external modules being interpreted as internal modules (#793, #794 thanks @ephys)- allow aliases that start with @ to be "internal" (#1293, #1294, thanks @jeffshaver)
- aliased internal modules that look like core modules (#1297, thanks @echenley)
namespace
: add check for null ExportMap (#1235, #1144, thanks @ljqx)- [ExportMap] fix condition for checking if block comment (#1234, #1233, thanks @ljqx)
- Fix overwriting of dynamic import() CallExpression (
no-cycle
,no-relative-parent-imports
,no-unresolved
,no-useless-path-segments
) (#1218, #1166, #1035, thanks @vikr01) export
: false positives for TypeScript type + value export (#1319, thanks @bradzacher)export
: Support TypeScript namespaces (#1320, #1300, thanks @bradzacher)
- Update readme for TypeScript (#1256, #1277, thanks @kirill-konshin)
- make rule names consistent (#1112, thanks @feychenie)
- fix broken tests on master (#1295, thanks @jeffshaver and @ljharb)
no-commonjs
: add tests that show corner cases (#1308, thanks @TakeScoop)
2.16.0 - 2019-01-29
typescript
config (#1257, thanks @kirill-konshin)
- Memory leak of
SourceCode
objects for all parsed dependencies, resolved. (issue #1266, thanks @asapach and @sergei-startsev for digging in)
2.15.0 - 2019-01-22
- new rule:
no-named-export
(#1157, thanks @fsmaia)
no-extraneous-dependencies
:packageDir
option with array value was clobbering package deps instead of merging them (#1175/#1176, thanks @aravindet & @pzhine)dynamic-import-chunkname
: Add proper webpack comment parsing (#1163, thanks @st-sloth)named
: fix destructuring assignment (#1232, thanks @ljqx)
2.14.0 - 2018-08-13
no-useless-path-segments
: add commonJS (CJS) support (#1128, thanks @1pete)namespace
: add JSX check (#1151, thanks @jf248)
no-cycle
: ignore Flow imports (#1126, thanks @gajus)- fix Flow type imports (#1106, thanks @syymza)
no-relative-parent-imports
: resolve paths (#1135, thanks @chrislloyd)order
: fix autofixer when using typescript-eslint-parser (#1137, thanks @justinanastos)- repeat fix from #797 for #717, in another place (thanks @ljharb)
- add explicit support for RestElement alongside ExperimentalRestProperty (thanks @ljharb)
2.13.0 - 2018-06-24
- Add ESLint 5 support (#1122, thanks @ai and @ljharb)
- Add
no-relative-parent-imports
rule: disallow relative imports from parent directories (#1093, thanks @chrislloyd)
namespace
rule: ensure it works in eslint 5/ecmaVersion 2018 (thanks @ljharb)
2.12.0 - 2018-05-17
- Ignore type imports for
named
rule (#931, thanks @mattijsbliek) - Add documentation for
no-useless-path-segments
rule (#1068, thanks @manovotny) packageDir
option forno-extraneous-dependencies
can be array-valued (#1085, thanks @hulkish)
2.11.0 - 2018-04-09
- Fixer for
first
(#1046, thanks @fengkfengk) allow-require
option forno-commonjs
rule (#880, thanks @futpib)
- memory/CPU regression where ASTs were held in memory (#1058, thanks @klimashkin/@lukeapage)
2.10.0 - 2018-03-29
2.9.0 - 2018-02-21
- Add
group-exports
rule: style-guide rule to report use of multiple named exports (#721, thanks @robertrossmann) - Add
no-self-import
rule: forbids a module from importing itself. (#727, #449, #447, thanks @giodamelio). - Add
no-default-export
rule (#889, thanks @isiahmeadows) - Add
no-useless-path-segments
rule (#912, thanks @graingert and @danny-andrews) - ... and more! check the commits for v2.9.0
2.8.0 - 2017-10-18
exports-last
rule (#620 + #632, thanks @k15a)
- support scoped modules containing hyphens (#744, thanks @rosswarren)
- core-modules now resolves files inside declared modules (#886 / #891, thanks @mplewis)
- TypeError for missing AST fields from TypeScript (#842 / #944, thanks @alexgorbatchev)
2.7.0 - 2017-07-06
no-absolute-path
picks up speed boost, optional AMD support (#843, thanks @jseminck)
2.6.1 - 2017-06-29
- update bundled node resolver dependency to latest version
2.6.0 - 2017-06-23
- update tests / peerDeps for ESLint 4.0 compatibility (#871, thanks @mastilver)
memo-parser
updated to requirefilePath
on parser options as it melts down if it's not there, now that this plugin always provides it. (see #863)
2.5.0 - 2017-06-22
Re-releasing v2.4.0 after discovering that the memory leak is isolated to the memo-parser
,
which is more or less experimental anyway.
2.4.0 - 2017-06-02 [YANKED]
Yanked due to critical issue in eslint-module-utils with cache key resulting from #839.
- Add
filePath
intoparserOptions
passed toparser
(#839, thanks @sompylasar) - Add
allow
option tono-unassigned-import
to allow for files that match the globs (#671, #737, thanks @kevin940726).
2.3.0 - 2017-05-18
no-anonymous-default-export
rule: report anonymous default exports (#712, thanks @duncanbeevers).- Add new value to
order
'snewlines-between
option to allow newlines inside import groups (#627, #628, thanks @giodamelio) - Add
count
option to thenewline-after-import
rule to allow configuration of number of newlines expected (#742, thanks @ntdb)
no-extraneous-dependencies
: useread-pkg-up
to simplify finding + loadingpackage.json
(#680, thanks @wtgtybhertgeghgtwtg)- Add support to specify the package.json
no-extraneous-dependencies
(#685, thanks @ramasilveyra)
- attempt to fix crash in
no-mutable-exports
. (#660) - "default is a reserved keyword" in no-maned-default tests by locking down babylon to 6.15.0 (#756, thanks @gmathieu)
- support scoped modules containing non word characters
2.2.0 - 2016-11-07
- Corrected a few gaffs in the auto-ignore logic to fix major performance issues
with projects that did not explicitly ignore
node_modules
. (#654) import/ignore
setting was only being respected if the ignored module didn't start with animport
orexport
JS statementprefer-default-export
: fixed crash on export extensions (#653)
2.1.0 - 2016-11-02
- Add
no-named-default
rule: style-guide rule to report use of unnecessarily named default imports (#596, thanks @ntdb) no-extraneous-dependencies
: check globs against CWD + absolute path (#602 + #630, thanks @ljharb)
prefer-default-export
handles flowexport type
(#484 + #639, thanks @jakubsta)prefer-default-export
handles re-exported default exports (#609)- Fix crash when using
newline-after-import
with decorators (#592) - Properly report
newline-after-import
when next line is a decorator - Fixed documentation for the default values for the
order
rule (#601)
2.0.1 - 2016-10-06
- Fixed code that relied on removed dependencies. (#604)
2.0.0! - 2016-09-30
unambiguous
rule: report modules that are not unambiguously ES modules.recommended
shared config. Roughlyerrors
andwarnings
mixed together, with someparserOptions
in the mix. (#402)react
shared config: addedjsx: true
toparserOptions.ecmaFeatures
.- Added
no-webpack-loader-syntax
rule: forbid custom Webpack loader syntax in imports. (#586, thanks @fson!) - Add option
newlines-between: "ignore"
toorder
(#519) - Added
no-unassigned-import
rule (#529)
import/extensions
setting defaults to['.js']
. (#306)import/ignore
setting defaults to nothing, and ambiguous modules are ignored natively. This means importing from CommonJS modules will no longer be reported bydefault
,named
, ornamespace
, regardless ofimport/ignore
. (#270)newline-after-import
: Removed need for an empty line after an inlinerequire
call (#570)order
: Default value fornewlines-between
option is nowignore
(#519)
imports-first
is renamed tofirst
.imports-first
alias will continue to exist, but may be removed in a future major release.- Case-sensitivity: now specifically (and optionally) reported by
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)
1.16.0 - 2016-09-22
- Added
no-dynamic-require
rule: forbidrequire()
calls with expressions. (#567, #568) - Added
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 onexport default from '...'
(#566, thanks @preco21)default
: allow re-export of values from ignored files as default (#545, thanks @skyrpex)
1.15.0 - 2016-09-12
- Added an
allow
option tono-nodejs-modules
to allow exceptions (#452, #509). - Added
no-absolute-path
rule (#530, #538) max-dependencies
for specifying the maximum number of dependencies (bothimport
andrequire
) a module can have. (see #489, thanks @tizmagik)- Added glob option to config for
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!)
1.14.0 - 2016-08-22
import/parsers
setting: parse some dependencies (i.e. TypeScript!) with a different parser than the ESLint-configured parser. (#503)
namespace
exception for get property fromnamespace
import, which are re-export from commonjs module (#499 fixes #416, thanks @wKich)
1.13.0 - 2016-08-11
allowComputed
option fornamespace
rule. If set totrue
, won't report computed member references to namespaces. (see #456)
- Modified
no-nodejs-modules
error message to include the module's name (#453, #461)
import/extensions
setting is respected in spite of the appearance of imports in an imported file. (fixes #478, thanks @rhys-vdw)
1.12.0 - 2016-07-26
import/external-module-folders
setting: a possibility to configure folders for "external" modules (#444, thanks @zloirock)
1.11.1 - 2016-07-20
newline-after-import
exception forswitch
branches withrequire
s iff parsed assourceType:'module'
. (still #441, thanks again @ljharb)
1.11.0 - 2016-07-17
- Added an
peerDependencies
option tono-extraneous-dependencies
to allow/forbid peer dependencies (#423, #428, thanks @jfmengels!).
newline-after-import
exception for multiplerequire
s in an arrow function expression (e.g.() => require('a') || require('b')
). (#441, thanks @ljharb)
1.10.3 - 2016-07-08
- removing
Symbol
dependencies (i.e.for-of
loops) due to Node 0.10 polyfill issue (see #415). Should not make any discernible semantic difference.
1.10.2 - 2016-07-04
- Something horrible happened during
npm prepublish
of 1.10.1. Severalrm -rf node_modules && npm i
andgulp clean && npm prepublish
s later, it is rebuilt and republished as 1.10.2. Thanks @rhettlivingston for noticing and reporting!
1.10.1 - 2016-07-02 [YANKED]
- Officially support ESLint 3.x. (peerDependencies updated to
2.x - 3.x
)
1.10.0 - 2016-06-30
- Added new rule
no-restricted-paths
. (#155/#371, thanks @lo1tuma) import/core-modules
setting: allow configuration of additional module names, to be treated as builtin modules (a lapath
, etc. in Node). (#275 + #365, thanks @sindresorhus for driving)- React Native shared config (based on comment from #283)
- Fixed crash with
newline-after-import
related to the use of switch cases. (fixes #386, thanks @ljharb for reporting) (#395)
1.9.2 - 2016-06-21
- Issues with ignored/CJS files in
export
andno-deprecated
rules. (#348, #370)
1.9.1 - 2016-06-16
- Reordered precedence for loading resolvers. (#373)
1.9.0 - 2016-06-10
- Added support TomDoc comments to
no-deprecated
. (#321, thanks @josh) - Added support for loading custom resolvers (#314, thanks @le0nik)
prefer-default-export
handlesexport function
andexport const
in same file (#359, thanks @scottnonnenberg)
1.8.1 - 2016-05-23
export * from 'foo'
now properly ignores adefault
export fromfoo
, if any. (#328/#332, thanks @jkimbo) This impacts all static analysis of imported names. (default
,named
,namespace
,export
)- Make
order
'snewline-between
option handle multiline import statements (#313, thanks @singles) - Make
order
'snewline-between
option handle not assigned import statements (#313, thanks @singles) - Make
order
'snewline-between
option ignorerequire
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)
1.8.0 - 2016-05-11
prefer-default-export
, new rule. (#308, thanks @gavriguy)
- Ignore namespace / ES7 re-exports in
no-mutable-exports
. (#317, fixed by #322. thanks @borisyankov + @jfmengels) - Make
no-extraneous-dependencies
handle scoped packages (#316, thanks @jfmengels)
1.7.0 - 2016-05-06
newline-after-import
, new rule. (#245, thanks @singles)- Added an
optionalDependencies
option tono-extraneous-dependencies
to allow/forbid optional dependencies (#266, thanks @jfmengels). - Added
newlines-between
option toorder
rule (#298, thanks @singles) - add
no-mutable-exports
rule (#290, thanks @josh) import/extensions
setting: a list of file extensions to parse as modules and search forexport
s. 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)
1.6.1 - 2016-04-28
no-named-as-default-member
: don't crash on rest props. (#281, thanks @SimenB)- support for Node 6: don't pass
null
topath
functions. Thanks to @strawbrary for bringing this up (#272) and adding OSX support to the Travis config (#288).
1.6.0 - 2016-04-25
- add
no-named-as-default-member
towarnings
canned config - add
no-extraneous-dependencies
rule (#241, thanks @jfmengels) - add
extensions
rule (#250, thanks @lo1tuma) - add
no-nodejs-modules
rule (#261, thanks @jfmengels) - add
order
rule (#247, thanks @jfmengels) - consider
resolve.fallback
config option in the webpack resolver (#254)
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)
1.5.0 - 2016-04-18
- report resolver errors at the top of the linted file
- add
no-namespace
rule (#239, thanks @singles) - add
no-named-as-default-member
rule (#243, thanks @dmnd)
- Rearranged rule groups in README in preparation for more style guide rules
- support for Node 0.10, via
es6-*
ponyfills. Using native Map/Set/Symbol.
1.4.0 - 2016-03-25
- Resolver plugin interface v2: more explicit response format that more clearly covers the found-but-core-module case, where there is no path. Still backwards-compatible with the original version of the resolver spec.
- Resolver documentation
- using
package.json/files
instead of.npmignore
for package file inclusion (#228, thanks @mathieudutour) - using
es6-*
ponyfills instead ofbabel-runtime
1.3.0 - 2016-03-20
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).
- Huge reduction in execution time by only ignoring
import/ignore
setting if something that looks like anexport
is detected in the module content.
1.2.0 - 2016-03-19
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.
- added caching to core/resolve via #214, configured via
import/cache
setting
1.1.0 - 2016-03-15
- Added an
ignore
option tono-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.
1.0.4 - 2016-03-11
- respect hoisting for deep namespaces (
namespace
/no-deprecated
) (#211)
1.0.3 - 2016-02-26
- no-deprecated follows deep namespaces (#191)
namespace
no longer flags modules with only a default export as having no names. (ns.default is valid ES6)
1.0.2 - 2016-02-26
- don't parse imports with no specifiers (#192)
1.0.1 - 2016-02-25
- export
stage-0
shared config - documented
no-deprecated
- deep namespaces are traversed regardless of how they get imported (#189)
1.0.0 - 2016-02-24
no-deprecated
: WIP rule to let you know at lint time if you're using deprecated functions, constants, classes, or modules.
1.0.0-beta.0 - 2016-02-13
- support for (only) ESLint 2.x
- no longer needs/refers to
import/parser
orimport/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)
0.13.0 - 2016-02-08
no-commonjs
ruleno-amd
rule
- Removed vestigial
no-require
rule.no-commonjs
is more complete.
0.12.2 - 2016-02-06 [YANKED]
Unpublished from npm and re-released as 0.13.0. See #170.
0.12.1 - 2015-12-17
- Broke docs for rules out into individual files.
0.12.0 - 2015-12-14
- Ignore
import/ignore
setting if exports are actually found in the parsed module. Does this to support use ofjsnext:main
innode_modules
without the pain of managing an allow list or a nuanced deny list.
0.11.0 - 2015-11-27
- Resolver plugins. Now the linter can read Webpack config, properly follow aliases and ignore externals, dismisses inline loaders, etc. etc.!
See GitHub release notes for info on changes for earlier releases.