> For AI agents: the complete documentation index is available at https://rslint.rs/llms.txt, the full documentation bundle is available at https://rslint.rs/llms-full.txt.

# no-new

[Added in v0.5.0](https://github.com/web-infra-dev/rslint/releases/tag/v0.5.0)
## Configuration


```ts title=rslint.config.ts
import { defineConfig, js } from '@rslint/core';

export default defineConfig([
  js.configs.recommended,
  {
    rules: {
      'no-new': 'error',
    },
  },
]);
```

## Rule Details

Disallows the use of `new` operators outside of assignments or comparisons. The goal of `new` with a constructor is to create a new object of a particular type and assign or compare that object. A `new` expression used as a standalone statement discards the resulting object, which usually means the constructor should have been a plain function call instead.

Examples of **incorrect** code for this rule:

```javascript
new Thing();
```

Examples of **correct** code for this rule:

```javascript
var thing = new Thing();

Thing();
```

## Original Documentation

- [ESLint: no-new](https://eslint.org/docs/latest/rules/no-new)
- [Source code](https://github.com/eslint/eslint/blob/v10.8.1/lib/rules/no-new.js)
