# shebang

Rule `node/shebang`. Require correct usage of hashbang

- Source: node
- Technologies: Node.js
- Kind: correctness
- Needs type information: no
- Autofix: yes, in at least one linter
- Deprecated: yes
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1997 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `n/shebang` | no | safe | package `eslint-plugin-n` | [docs](https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/hashbang.md) |

## Enable it

### ESLint: `eslint.config.js`

```js
import n from "eslint-plugin-n";

export default [
  {
    plugins: { n },
    rules: {
      "n/shebang": "error",
    },
  },
];
```

## Related rules

- [node/require-child-process-timeout](https://lintradar.dev/rules/node/require-child-process-timeout.md): Require a timeout or signal for child processes
- [node/prefer-promises/fs](https://lintradar.dev/rules/node/prefer-promises/fs.md): Enforce `require("fs").promises`
- [node/prefer-promises/dns](https://lintradar.dev/rules/node/prefer-promises/dns.md): Enforce `require("dns").promises`
- [node/prefer-import/assert-strict](https://lintradar.dev/rules/node/prefer-import/assert-strict.md): Enforce using `node:assert/strict` instead of `node:assert`.
- [node/prefer-global/url-search-params](https://lintradar.dev/rules/node/prefer-global/url-search-params.md): Enforce either `URLSearchParams` or `require("url").URLSearchParams`
- [node/prefer-global/url](https://lintradar.dev/rules/node/prefer-global/url.md): Enforce either `URL` or `require("url").URL`

---

Web page: https://lintradar.dev/rules/node/shebang. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
