Packages

eslint-plugin-import

2.32.0 · 20 Jun 2025MIT84.5M / weekRepositorynpmAtom feed

Your version

2.23.0

14 May 2021Where it was published

2.32.0 is the newest release of 2.x.

In short

7 new14 fixed1 changed5 internal

Release note

Added

  • [no-commonjs]: Also detect require calls with expressionless template literals: require(`x`) ([#1958], thanks [@FloEdelmann])

  • [no-internal-modules]: Add forbid 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 for export. ([#1997], thanks [@s-h-a-d-o-w])

  • [order]: support type imports ([#2021], thanks [@grit96])

  • [order]: Add warnOnUnassignedImports 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 of import = 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 flow typeof imports ([#1534], thanks [@devongovett])

  • [newline-after-import]: respect decorator annotations ([#1985], thanks [@lilling])

  • [no-restricted-paths]: enhance performance for zones with except paths ([#2022], thanks [@malykhinvi])

  • [no-unresolved]: check import() ([#2026], thanks [@aladdin-add])

Changed

  • Make callback for all imports once in rules ([#1237], thanks [@ljqx])

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.