github un-ts/eslint-plugin-import-x v4.19.0

2 hours ago

Minor Changes

  • #617 b9754a9 Thanks @thekhegay! - feat(consistent-type-specifier-style): add prefer-top-level-if-only-type-imports option

  • #640 db3333c Thanks @thekhegay! - feat(export): check the members exported by declarations of one namespace together, and let interfaces of one name merge

  • #632 42224c2 Thanks @thekhegay! - feat(namespace): check heritage clauses against JSDoc @typedef and @callback names of local non-TypeScript modules

  • #653 b325bc7 Thanks @thekhegay! - feat(no-cycle): add includeTypes option to report cycles through type-only imports and re-exports

  • #616 3b37ef7 Thanks @thekhegay! - feat(no-duplicates): add considerReexports option to report and merge repeated named re-exports from the same module

  • #628 5d7dc58 Thanks @thekhegay! - feat(no-extraneous-dependencies): add transitiveDependencies option to allow packages that a declared metapackage brings in

  • #623 6fd3ccb Thanks @thekhegay! - feat(no-relative-parent-imports): add maxLevels option to allow imports up to a number of parent directories

  • #625 3bc592e Thanks @thekhegay! - feat(no-relative-parent-imports): add ignorePrivateImports option to skip subpath imports declared in package.json imports

  • #597 0ec4d59 Thanks @RClaudiuM! - feat: add no-self-package-import rule to forbid a package from importing itself through its own exports map

  • #610 efd9228 Thanks @thekhegay! - feat(no-unresolved): add includeTypes option to check type-only imports and exports

  • #619 ad03322 Thanks @thekhegay! - feat(no-unused-modules): list files without FileEnumerator, so the rule works with flat config without an eslintrc and on ESLint 10. Note: on ESLint 10 the rule was a no-op before and now reports, and suppressMissingFileEnumeratorAPIWarning is deprecated and has no effect

  • #629 54f117b Thanks @thekhegay! - feat: add import-x/parsers-next setting that lists parser instances with the file extensions they parse, entries for the same extension are tried in order as fallbacks

  • #596 9afcfd9 Thanks @SwastikTripathi! - feat(no-useless-path-segments): report a useless /index in aliased imports of local files when noUselessIndex is enabled

  • #654 488c874 Thanks @thekhegay! - feat: add no-self-import to the recommended config as a warning

  • #620 57f0024 Thanks @thekhegay! - consistent-type-specifier-style: add top-level and inline option aliases for prefer-top-level and prefer-inline

  • #634 5996d63 Thanks @SchroederSteffen! - feat(deps): add @typescript-eslint/parser as optional peer dependency

Patch Changes

  • #613 66d3ca6 Thanks @JounQin! - chore: bump unrs-resolver to v1.13.0

  • #618 23b3214 Thanks @thekhegay! - fix(default): do not report default imports of files that only use dynamic import() and may be CommonJS, keep reporting .mjs, .mts and type: module files

  • #648 7eb388a Thanks @anubhavlal07! - fix(no-default-export, no-named-export): treat export * as default from as a default export

  • #651 d2641e8 Thanks @bardrop! - fix(exports-last): treat TypeScript export = and export as namespace as exports

  • #637 edb69dd Thanks @thekhegay! - fix(extensions): stop inferring an extension for an extensionless import of a declaration file that has no runtime file with that extension next to it, such as jsx for #types/graphql resolving to types/graphql.d.ts.

  • #659 c2015f6 Thanks @JounQin! - fix(extensions): don't report a missing extension when the resolved target has no extension and no runtime file to carry one

  • #656 e349170 Thanks @thekhegay! - fix(first): skip MDX front matter (MDYaml, MDToml from eslint-mdx) before the first import, and move imports after it, not before

  • #614 80cea17 Thanks @JounQin! - fix(no-rename-default): derive the default export name from a parenthesized assignment, e.g. export default (Foo = function () {}), which is how prettier v3.9 formats such defaults

  • #631 b2e6f08 Thanks @thekhegay! - fix: classify a resolved path correctly when the linted file is reached through a symlink

  • #624 0398562 Thanks @thekhegay! - fix: match ignore patterns with g or y flags against every import, not only every other one

  • #622 110a135 Thanks @thekhegay! - fix(newline-after-import): count empty lines before a statement's leading ; in semicolon-free code

  • #653 b325bc7 Thanks @thekhegay! - fix(no-cycle): ignore type-only re-exports such as export type { Foo } from when the cycle starts in the linted file

  • #627 9257464 Thanks @thekhegay! - fix(no-duplicates): treat entry points that share one declaration file but have their own declare module blocks, like svelte and svelte/transition, as different modules

  • #647 deebda9 Thanks @bardrop! - fix(no-duplicates): don't merge a later import into a side-effect import like import './setup', since order could then move it and run the module later

  • #643 8117fd1 Thanks @thekhegay! - fix(no-duplicates): keep the whole first import in the fix range, so @typescript-eslint/consistent-type-imports cannot turn merged value imports type-only in the same pass

  • #646 253ff7b Thanks @shivangithaker-0510! - fix(no-empty-named-blocks): ignore the import attributes block, so import Default from 'mod' with {} is no longer reported and broken by the fix, and import 'mod' with {} no longer crashes the rule

  • #626 1a70ac8 Thanks @bardrop! - fix(no-restricted-paths): resolve glob except patterns against basePath, like target and from

  • #650 8188e1e Thanks @thekhegay! - fix: drop docs.recommended from rules that are not in the recommended config

  • #660 4819264 Thanks @JounQin! - fix(deps): bump eslint-import-context to v0.2.2

Don't miss a new eslint-plugin-import-x release

NewReleases is sending notifications on new releases.