--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalid.ts --- # Input ```ts // Header comment import type A from "mod"; // Header comment import type * as B from "mod"; // Import comment // Header comment import type { C } from "mod"; // Import comment // Header comment import /*a*/ D /*b*/, /*c*/{ type E }/*d*/ from "mod"; // Import comment import /*a*/ F /*b*/, /*c*/ * as G /*d*/ from "mod"; import { // Comment type H, type I, } from "mod"; import {/*a*/type J/*b*/, /*c*/type K/*d*/} from "mod"; // Header comment import type { L as M, } from "mod"; // Import comment ``` # Diagnostics ``` invalid.ts:2:13 lint/correctness/noUnusedImports FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This import is unused. 1 │ // Header comment > 2 │ import type A from "mod"; │ ^ 3 │ 4 │ // Header comment i Unused imports might be the result of an incomplete refactoring. i Safe fix: Remove the unused import. 1 1 │ // Header comment 2 │ - import·type·A·from·"mod"; 3 2 │ 4 3 │ // Header comment ``` ``` invalid.ts:5:18 lint/correctness/noUnusedImports FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This import is unused. 4 │ // Header comment > 5 │ import type * as B from "mod"; // Import comment │ ^ 6 │ 7 │ // Header comment i Unused imports might be the result of an incomplete refactoring. i Safe fix: Remove the unused import. 3 3 │ 4 4 │ // Header comment 5 │ - import·type·*·as·B·from·"mod";·//·Import·comment 6 5 │ 7 6 │ // Header comment ``` ``` invalid.ts:8:15 lint/correctness/noUnusedImports FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This import is unused. 7 │ // Header comment > 8 │ import type { C } from "mod"; // Import comment │ ^ 9 │ 10 │ // Header comment i Unused imports might be the result of an incomplete refactoring. i Safe fix: Remove the unused import. 6 6 │ 7 7 │ // Header comment 8 │ - import·type·{·C·}·from·"mod";·//·Import·comment 9 8 │ 10 9 │ // Header comment ``` ``` invalid.ts:11:14 lint/correctness/noUnusedImports FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This import is unused. 10 │ // Header comment > 11 │ import /*a*/ D /*b*/, /*c*/{ type E }/*d*/ from "mod"; // Import comment │ ^ 12 │ 13 │ import /*a*/ F /*b*/, /*c*/ * as G /*d*/ from "mod"; i Unused imports might be the result of an incomplete refactoring. i Safe fix: Remove the unused import. 11 │ import·/*a*/·D·/*b*/,·/*c*/{·type·E·}/*d*/·from·"mod";·//·Import·comment │ -------------- ``` ``` invalid.ts:11:35 lint/correctness/noUnusedImports FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This import is unused. 10 │ // Header comment > 11 │ import /*a*/ D /*b*/, /*c*/{ type E }/*d*/ from "mod"; // Import comment │ ^ 12 │ 13 │ import /*a*/ F /*b*/, /*c*/ * as G /*d*/ from "mod"; i Unused imports might be the result of an incomplete refactoring. i Safe fix: Remove the unused import. 11 │ import·/*a*/·D·/*b*/,·/*c*/{·type·E·}/*d*/·from·"mod";·//·Import·comment │ ---------------------- ``` ``` invalid.ts:13:14 lint/correctness/noUnusedImports FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This import is unused. 11 │ import /*a*/ D /*b*/, /*c*/{ type E }/*d*/ from "mod"; // Import comment 12 │ > 13 │ import /*a*/ F /*b*/, /*c*/ * as G /*d*/ from "mod"; │ ^ 14 │ 15 │ import { i Unused imports might be the result of an incomplete refactoring. i Safe fix: Remove the unused import. 13 │ import·/*a*/·F·/*b*/,·/*c*/·*·as·G·/*d*/·from·"mod"; │ --------------- ``` ``` invalid.ts:13:34 lint/correctness/noUnusedImports FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This import is unused. 11 │ import /*a*/ D /*b*/, /*c*/{ type E }/*d*/ from "mod"; // Import comment 12 │ > 13 │ import /*a*/ F /*b*/, /*c*/ * as G /*d*/ from "mod"; │ ^ 14 │ 15 │ import { i Unused imports might be the result of an incomplete refactoring. i Safe fix: Remove the unused import. 13 │ import·/*a*/·F·/*b*/,·/*c*/·*·as·G·/*d*/·from·"mod"; │ -------------------- ``` ``` invalid.ts:17:10 lint/correctness/noUnusedImports FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This import is unused. 15 │ import { 16 │ // Comment > 17 │ type H, │ ^ 18 │ type I, 19 │ } from "mod"; i Unused imports might be the result of an incomplete refactoring. i Safe fix: Remove the unused import. 14 14 │ 15 15 │ import { 16 │ - ····//·Comment 17 │ - ····type·H, 18 │ - ····type·I, 16 │ + ····type·I, 19 17 │ } from "mod"; 20 18 │ ``` ``` invalid.ts:18:10 lint/correctness/noUnusedImports FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This import is unused. 16 │ // Comment 17 │ type H, > 18 │ type I, │ ^ 19 │ } from "mod"; 20 │ i Unused imports might be the result of an incomplete refactoring. i Safe fix: Remove the unused import. 16 16 │ // Comment 17 17 │ type H, 18 │ - ····type·I, 19 18 │ } from "mod"; 20 19 │ ``` ``` invalid.ts:21:19 lint/correctness/noUnusedImports FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This import is unused. 19 │ } from "mod"; 20 │ > 21 │ import {/*a*/type J/*b*/, /*c*/type K/*d*/} from "mod"; │ ^ 22 │ 23 │ // Header comment i Unused imports might be the result of an incomplete refactoring. i Safe fix: Remove the unused import. 21 │ import·{/*a*/type·J/*b*/,·/*c*/type·K/*d*/}·from·"mod"; │ ------------------ ``` ``` invalid.ts:21:37 lint/correctness/noUnusedImports FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This import is unused. 19 │ } from "mod"; 20 │ > 21 │ import {/*a*/type J/*b*/, /*c*/type K/*d*/} from "mod"; │ ^ 22 │ 23 │ // Header comment i Unused imports might be the result of an incomplete refactoring. i Safe fix: Remove the unused import. 21 │ import·{/*a*/type·J/*b*/,·/*c*/type·K/*d*/}·from·"mod"; │ ----------- ``` ``` invalid.ts:24:20 lint/correctness/noUnusedImports FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This import is unused. 23 │ // Header comment > 24 │ import type { L as M, } from "mod"; // Import comment │ ^ 25 │ i Unused imports might be the result of an incomplete refactoring. i Safe fix: Remove the unused import. 22 22 │ 23 23 │ // Header comment 24 │ - import·type·{·L·as·M,·}·from·"mod";·//·Import·comment 25 24 │ ```