# unicorn/require-module-specifiers

> Disallow empty braces in `import` and `export` statements

`import {} from "./setup.js"` doesn't import any names. It's usually left over after the last name was removed. If you want the module to run for its side effects, `import "./setup.js"` says so.

`--fix` removes the empty braces after a default import, and removes `export {}`. It leaves `import {} from` and `export {} from` to you, because they still load the module.

{/* 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-specifiers" = "error" # or "warn"
```

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

## Examples

Reported:

{/* bad {"count": 3} */}
```js
import {} from "./setup.js";
import app, {} from "./app.js";
export {};
```

Not reported:

{/* good */}
```js
import "./setup.js";
import app from "./app.js";
export { app };
```

## When not to use it

In TypeScript, `export {}` is a common way to make a file without imports or exports a module. Turn the rule off for those files, or set `moduleDetection` to `"force"` in `tsconfig.json`.
