An import names a binding that the imported module of the project does not export
What it finds
An import of a name that the imported module does not export fails: TypeScript does not compile it, an ES module fails to link, and a bundler leaves the binding undefined. It follows renames and removals in another file that were not carried over.
Only relative imports of files of the project are checked, and only against modules whose exports can be listed: modules that use module.exports, export =, Flow, have syntax errors, pass on the exports of a package, or that another file augments with declare module, are left alone, and so are declaration files, which export what they declare without saying so. A script without any export is taken to be a CommonJS module, and the types a script declares with @typedef or @callback count as its exports. When a specifier may mean a source and its compiled output, the name must be missing from both.
From the rule's source, import_name_not_exported.rs.
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:
[rules]
"tx0/ts:import-name-not-exported" = "error"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:import-name-not-exported] reason="..."tx0 explain tx0/ts:import-name-not-exported shows the same in the terminal. Found a false positive? Report it.