Update dependency eslint-plugin-import to v2 #502
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^1.9.2
->^2.0.0
Release Notes
import-js/eslint-plugin-import
v2.26.0
Compare Source
Added
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])Fixed
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])Changed
no-nodejs-modules
: add tests for node protocol URL ([#2367], thanks [@sosukesuzuki])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])no-unresolved
]: Fix RegExp escaping in readme ([#2332], thanks [@stephtr])namespace
: try to improve performance ([#2340], thanks [@ljharb])order
: TS code examples should use TS code blocks ([#2411], thanks [@MM25Zamanian])no-unresolved
: fix link ([#2417], thanks [@kylemh])v2.25.4
Compare Source
Fixed
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])Changed
no-default-import
]: report on the token "default" instead of the entire node ([#2299], thanks [@pmcelhaney])order
]: Remove duplicate mention of default ([#2280], thanks [@johnthagen])eslint-module-utils
v2.25.3
Compare Source
Fixed
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])Changed
order
]: add type to the default groups ([#2272], thanks [@charpeni])importType
: combine redundantisScoped
andisScopedModule
(thanks [@ljharb])v2.25.2
Compare Source
Fixed
eslint-module-utils
for real this time ([#2255], thanks [@ljharb])v2.25.1
Compare Source
Fixed
eslint-module-utils
v2.25.0
Compare Source
Added
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])Fixed
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])Changed
pkg-up
andread-pkg-up
([#2047], thanks [@mgwalker]).d.ts
from [import/parsers
setting] and [import/extensions
setting] ([#2220], thanks [@jablko])no-unresolved
], [no-extraneous-dependencies
]: moduleVisitor usage ([#2233], thanks [@jablko])v2.24.2
Compare Source
Fixed
named
], [namespace
]: properly handle ExportAllDeclarations ([#2199], thanks [@ljharb])v2.24.1
Compare Source
Fixed
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])Changed
max-dependencies
: 📖 DocumentignoreTypeImports
option ([#2196], thanks [@himynameisdave])v2.24.0
Compare Source
Added
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])Fixed
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])context.getPhysicalFilename()
when available (ESLint 7.28+) ([#2160], thanks [@pmcelhaney])extensions
]/importType
: fix isScoped treating @/abc as scoped module ([#2146], thanks [@rperello])Changed
extensions
]: improved cases for using@/...
([#2140], thanks [@wenfangdu])extensions
]: removed incorrect cases ([#2138], thanks [@wenfangdu])order
]: add tests forpathGroupsExcludedImportTypes: ['type']
([#2158], thanks [@atav32])order
]: improve the documentation for thepathGroupsExcludedImportTypes
option ([#2156], thanks [@liby])no-cycle
]: Restructure test files ([#1517], thanks [@soryy708])v2.23.4
Compare Source
Fixed
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])v2.23.3
Compare Source
Fixed
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])Changed
no-relative-packages
to list of to the list of rules ([#2075], thanks [@arvigeus])v2.23.2
Compare Source
Changed
safe-publish-latest
; useprepublishOnly
script for npm 7+v2.23.1
Compare Source
Fixed
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])v2.23.0
Compare Source
Added
no-commonjs
]: Also detect require calls with expressionless template literals:require(`x`)
([#1958], thanks [@FloEdelmann])no-internal-modules
]: Addforbid
option ([#1846], thanks [@guillaumewuip])no-relative-packages
] ([#1860], [#966], thanks [@tapayne88] [@panrafal])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])Fixed
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])Changed
no-named-as-default
]: add semicolon ([#1897], thanks [@bicstone])no-extraneous-dependencies
: correct peerDependencies option default totrue
([#1993], thanks [@dwardu])order
: Document options required to match ordering example ([#1992], thanks [@silviogutierrez])no-unresolved
: add tests forimport()
([#2012], thanks [@davidbonnet])v2.22.1
Compare Source
Fixed
default
]/TypeScript: avoid crash onexport =
with a MemberExpression ([#1841], thanks [@ljharb])extensions
]/importType: Fix @/abc being treated as scoped module ([#1854], thanks [@3nuc])dynamic-import-chunkname
]: allow single quotes to match Webpack support ([#1848], thanks [@straub])Changed
export
]: add tests for a name collision withexport * from
([#1704], thanks @tomprats)v2.22.0
Compare Source
Added
no-unused-modules
]: consider exported TypeScript interfaces, types and enums ([#1819], thanks [@nicolashenry])no-cycle
]: allowmaxDepth
option to be"∞"
(thanks [@ljharb])Fixed
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])Changed
no-extraneous-dependencies
]: add tests for importing types ([#1824], thanks [@taye])no-default-export
]: Fix docs url ([#1836], thanks [@beatrizrezener])imports-first
]: deprecation info and link tofirst
docs ([#1835], thanks [@beatrizrezener])v2.21.2
Compare Source
Fixed
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])v2.21.1
Compare Source
Fixed
import/named
]: avoid requiringtypescript
when not using TS ([#1805], thanks [@ljharb])v2.21.0
Compare Source
Added
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])Fixed
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])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])export
]: avoid a crash withexport =
([#1801], thanks [@ljharb])Changed
no-extraneous-dependencies
: use moduleVisitor ([#1735], thanks [@adamborowski])named
][] ([#1726], thanks [@astorije])no-unused-modules
] from docs ([#1690], thanks [@arvigeus])order
: fix bad inline config ([#1788], thanks [@nickofthyme])no-unused-rules
: Fix docs for unused exports ([#1776], thanks [@barbogast])v2.20.2
Compare Source
Fixed
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])no-webpack-loader-syntax
: Updates webpack URLs ([#1751], thanks [@MikeyBeLike])v2.20.1
Compare Source
Fixed
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])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])Changed
import/external-module-folders
setting] behavior is more strict now: it will only match complete path segments ([#1605], thanks [@skozin])order
: Add TS import type tests ([#1736], thanks [@kmui2])v2.20.0
Compare Source
Added
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])Fixed
no-unused-modules
]: fix usage of [import/extensions
setting] ([#1560], thanks [@stekycz])extensions
]: ignore non-main modules ([#1563], thanks [@saschanaz])no-extraneous-dependencies
]: ensurenode.source
is truthy ([#1589], thanks [@ljharb])extensions
]: Ignore query strings when checking for extensions ([#1572], thanks [@pcorpet])Docs
extensions
]: improveignorePackages
docs ([#1248], thanks [@ivo-stefchev])v2.19.1
Compare Source
Fixed
no-extraneous-dependencies
]: ensurenode.source
existsv2.19.0
Compare Source
Added
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])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])Fixed
default
]: make error message less confusing ([#1470], thanks [@golopot])ExportMap.for
by only loading paths when necessary. ([#1519], thanks [@brendo])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])Docs
no-useless-path-segments
]: add docs for optioncommonjs
([#1507], thanks [@golopot])Changed
no-unused-modules
]/eslint-module-utils
: Avoid superfluous calls and code ([#1551], thanks [@brettz9])v2.18.2
Compare Source
Fixed
v2.18.1
Compare Source
Fixed
@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])Refactors
no-extraneous-dependencies
],importType
: remove lodash ([#1419], thanks [@ljharb])v2.18.0
Compare Source
Added
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])Fixed
no-unused-modules
]: handle ClassDeclaration ([#1371], thanks [@golopot])Docs
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])v2.17.3
Compare Source
Fixed
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])Docs
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])env
option foreslint-import-resolver-webpack
([#1363], thanks [@kgregory])v2.17.2
Compare Source
Fixed
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])v2.17.1
Compare Source
Fixed
eslint-module-utils
([#1322])v2.17.0
Compare Source
Added
no-useless-path-segments
]: AddnoUselessIndex
option ([#1290], thanks [@timkraut])no-duplicates
]: Add autofix ([#1312], thanks [@lydell])no-unused-modules
] rule ([#1142], thanks [@rfermann])Fixed
order
]: Fix interpreting some external modules being interpreted as internal modules ([#793], [#794] thanks [@ephys])namespace
]: add check for null ExportMap ([#1235], [#1144], thanks [@ljqx])no-cycle
], [no-relative-parent-imports
], [no-unresolved
], [no-useless-path-segments
]) ([#1218], [#1166], [#1035], thanks [@vikr01])export
]: false positives for TConfiguration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.
🔕 Ignore: Close this PR and you won't be reminded about this update again.