# no-useless-constructor

Rule `eslint/no-useless-constructor`. Disallow unnecessary constructors

- Source: eslint
- Technologies: JavaScript
- Kind: suspicious
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 43.6M weekly downloads of presets that enable it
- Trend: +61.0% last quarter
- Rank: #311 by reach, #706 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `no-useless-constructor` | no | suggestion | package `eslint` | [docs](https://eslint.org/docs/latest/rules/no-useless-constructor) |
| Oxlint | `no-useless-constructor` | no | safe | plugin `eslint`, category suspicious | [docs](https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-useless-constructor.html) |
| Biome | `complexity/noUselessConstructor` | yes | unsafe | group complexity, since 1.0.0 | [docs](https://biomejs.dev/linter/rules/no-useless-constructor/) |

## Code examples

### Incorrect: the rule reports this

```js
class A {
    constructor () {
    }
}

class B extends A {
    constructor (...args) {
      super(...args);
    }
}
```

```ts
class A {
    public constructor() {}
}
```

### Correct: the rule accepts this

```js
class A { }

class B {
    constructor () {
        doSomething();
    }
}

class C extends A {
    constructor() {
        super('foo');
    }
}

class D extends A {
    constructor() {
        super();
        doSomething();
    }
}
```

```ts
class A {
    protected constructor() {}
}

class B extends A {
    public constructor() {
        super();
    }
}

class C {
    constructor(@decorated param) {}
}
```

Examples from the ESLint documentation.

## Enable it

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

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

### Oxlint: `.oxlintrc.json`

```json
{
  "rules": {
    "no-useless-constructor": "error"
  }
}
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "complexity": {
        "noUselessConstructor": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [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% |
| [JavaScript Standard Style](https://lintradar.dev/presets/standard.md) | ESLint | `eslint-config-standard` | 161 | 3.1M | +12.9% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |
| [Ultracite for Oxlint](https://lintradar.dev/presets/ultracite-oxlint.md) | Oxlint | `ultracite` | 475 | 2.1M | +151.7% |

## Related rules

- [typescript/no-useless-constructor](https://lintradar.dev/rules/typescript/no-useless-constructor.md): Disallow unnecessary constructors
- [eslint/no-use-before-define](https://lintradar.dev/rules/eslint/no-use-before-define.md): Disallow the use of variables before they are defined
- [eslint/prefer-arrow-callback](https://lintradar.dev/rules/eslint/prefer-arrow-callback.md): Require using arrow functions for callbacks
- [eslint/no-extra-label](https://lintradar.dev/rules/eslint/no-extra-label.md): Disallow unnecessary labels
- [eslint/no-unneeded-ternary](https://lintradar.dev/rules/eslint/no-unneeded-ternary.md): Disallow ternary operators when simpler alternatives exist
- [eslint/prefer-regex-literals](https://lintradar.dev/rules/eslint/prefer-regex-literals.md): Disallow use of the `RegExp` constructor in favor of regular expression literals

---

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