An import or re-export declaration lists no names

tx0/ts:empty-import-listrecommendedwarningsmell

What it finds

import {} from "./setup" lists no names, so it only runs the module for its side effects, which import "./setup" says plainly; export {} from "./x" does nothing at all. Both are usually what is left after the last name was removed.

export {} without a source, which TypeScript files use to mark themselves as modules, and import type {} from, which brings in type declarations without running the module, are left alone.

From the rule's source, empty_import_list.rs.

Example from the rule's tests
import {} from "./setup";tx0 reports: this import lists no namesexport {} from "./other";tx0 reports: this re-export lists no namesimport "./polyfills";export {};
Highlighted lines are the ones tx0 reports, with its message under each; the other lines are left alone.

Turn it on, off or suppress it

The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/ts:empty-import-list" = "warning"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

// tx0: ignore[tx0/ts:empty-import-list] reason="..."

tx0 explain tx0/ts:empty-import-list shows the same in the terminal. Found a false positive? Report it.