# no-new-require

Rule `eslint/no-new-require`. Disallow `new` operators with calls to `require`

- Source: eslint
- Technologies: JavaScript
- Kind: style
- Needs type information: no
- Autofix: no
- Deprecated: yes
- Reach: 11.2M weekly downloads of presets that enable it
- Trend: +2.6% last quarter
- Rank: #865 by reach, #1551 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `no-new-require` | no | no | package `eslint` | [docs](https://eslint.org/docs/latest/rules/no-new-require) |
| Biome | `nursery/noNewRequire` | no | no | group nursery, since 2.6.3 | [docs](https://biomejs.dev/linter/rules/no-new-require/) |

## Code examples

### Incorrect: the rule reports this

```js
var appHeader = new require('app-header');
```

### Correct: the rule accepts this

```js
var AppHeader = require('app-header');
var appHeader = new AppHeader();
```

Examples from the ESLint documentation.

## Enable it

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

```js
export default [
  {
    rules: {
      "no-new-require": "error",
    },
  },
];
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "noNewRequire": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Airbnb base](https://lintradar.dev/presets/airbnb-base.md) | ESLint | `eslint-config-airbnb-base` | 241 | 6.5M | +2.1% |
| [Airbnb](https://lintradar.dev/presets/airbnb.md) | ESLint | `eslint-config-airbnb` | 346 | 3.4M | +2.3% |
| [React Native](https://lintradar.dev/presets/react-native.md) | ESLint | `@react-native/eslint-config` | 79 | 1.2M | +5.8% |

## Related rules

- [node/no-new-require](https://lintradar.dev/rules/node/no-new-require.md): Disallow `new` operators with calls to `require`
- [eslint/no-console](https://lintradar.dev/rules/eslint/no-console.md): Disallow the use of `console`
- [eslint/no-shadow](https://lintradar.dev/rules/eslint/no-shadow.md): Disallow variable declarations from shadowing variables declared in the outer scope
- [eslint/no-empty-function](https://lintradar.dev/rules/eslint/no-empty-function.md): Disallow empty functions
- [eslint/no-nested-ternary](https://lintradar.dev/rules/eslint/no-nested-ternary.md): Disallow nested ternary expressions
- [eslint/max-classes-per-file](https://lintradar.dev/rules/eslint/max-classes-per-file.md): Enforce a maximum number of classes per file

---

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