# unicorn/require-module-attributes

> Disallow an empty attribute list in `import`, `export` and `import()`

`with {}` after an import does nothing. It's usually left over after an attribute was deleted, or it's a placeholder for one that was never written, such as `type: "json"`.

In `import()`, the rule reports both an empty second argument and an empty `with` inside it.

{/* Generated by src/codegen/lint-rule-docs.ts. Do not edit this section. */}

## Configure

Off by default. To turn it on:

```toml bunfig.toml
[lint.rules]
"unicorn/require-module-attributes" = "error" # or "warn"
```

{/* End of the generated section. */}

## Examples

Reported:

{/* bad {"count": 4} */}
```js
import settings from "./settings.json" with {};
export { version } from "./package.json" with {};

const en = await import("./en.json", {});
const de = await import("./de.json", { with: {} });
```

Not reported:

{/* good */}
```js
import settings from "./settings.json" with { type: "json" };
export { start } from "./server.js";

const en = await import("./en.json", { with: { type: "json" } });
const app = await import("./app.js");
```
