Skip to content

emptyModuleAttributes

Reports empty import/export attributes that serve no purpose.

✅ This rule is included in the ts stylistic presets.

Import attributes (using with {}) allow specifying metadata about a module import. An empty with {} clause provides no additional information and should be removed.

import data from "./data.json" with {};
import { x } from "./module" with {};
export { x } from "./module" with {};
export * from "./module" with {};

This rule is not configurable.

If you intentionally use empty import attributes as placeholders or for tooling purposes, you may disable this rule.

Made with ❤️‍🔥 in Boston by Josh Goldberg and contributors.