# no-new-object

Rule `eslint/no-new-object`. Disallow `Object` constructors

- Source: eslint
- Technologies: JavaScript
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Deprecated: yes
- Reach: 19M weekly downloads of presets that enable it
- Trend: +5.0% last quarter
- Rank: #632 by reach, #1518 by growth

## Linters

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

## Code examples

### Incorrect: the rule reports this

```js
var myObject = new Object();

new Object();

var foo = new Object("foo");
```

### Correct: the rule accepts this

```js
var myObject = new CustomObject();

var myObject = {};

var Object = function Object() {};
new Object();

var foo = Object("foo");
```

Examples from the ESLint documentation.

## Enable it

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

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

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "noObjectConstructor": "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% |
| [Create React App](https://lintradar.dev/presets/react-app.md) | ESLint | `eslint-config-react-app` | 109 | 4.1M | +4.3% |
| [Airbnb](https://lintradar.dev/presets/airbnb.md) | ESLint | `eslint-config-airbnb` | 346 | 3.4M | +2.3% |
| [JavaScript Standard Style](https://lintradar.dev/presets/standard.md) | ESLint | `eslint-config-standard` | 161 | 3.1M | +12.9% |
| [React Native](https://lintradar.dev/presets/react-native.md) | ESLint | `@react-native/eslint-config` | 79 | 1.2M | +5.8% |
| [Google](https://lintradar.dev/presets/google.md) | ESLint | `eslint-config-google` | 60 | 646.4K | +18.9% |
| [Alloy](https://lintradar.dev/presets/alloy.md) | ESLint | `eslint-config-alloy` | 166 | 31.4K | +32.4% |

## Related rules

- [eslint/no-new](https://lintradar.dev/rules/eslint/no-new.md): Disallow `new` operators outside of assignments or comparisons
- [eslint/unicode-bom](https://lintradar.dev/rules/eslint/unicode-bom.md): Require or disallow Unicode byte order mark (BOM)
- [eslint/yoda](https://lintradar.dev/rules/eslint/yoda.md): Require or disallow "Yoda" conditions
- [eslint/no-useless-computed-key](https://lintradar.dev/rules/eslint/no-useless-computed-key.md): Disallow unnecessary computed property keys in objects and classes
- [eslint/no-throw-literal](https://lintradar.dev/rules/eslint/no-throw-literal.md): Disallow throwing literals as exceptions
- [eslint/no-multi-str](https://lintradar.dev/rules/eslint/no-multi-str.md): Disallow multiline strings

---

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