Skip to content

[no-unused-modules] import type doesn't mark export as used. #1950

Closed

Description

Repro:

// Foo.ts
export interface Foo {}

// index.ts
import type { Foo } from "./Foo"

exported declaration 'Foo' not used within other modules

Config:

{
  "extends": [
    "plugin:import/recommended",
    "plugin:import/typescript",
    // and more ...
  ],
  "rules": {
    "import/no-unused-modules": ["error", { "unusedExports": true }],
  },
}

Versions:

@typescript-eslint/parser: 4.8.0
eslint: 7.13.0
eslint-plugin-import: 2.22.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions