# no-this-before-super

Rule `eslint/no-this-before-super`. Disallow `this`/`super` before calling `super()` in constructors

- Source: eslint
- Technologies: JavaScript
- Kind: correctness
- Needs type information: no
- Autofix: no
- Reach: 278.1M weekly downloads of presets that enable it
- Trend: +45.2% last quarter
- Rank: #22 by reach, #904 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `no-this-before-super` | yes | no | package `eslint` | [docs](https://eslint.org/docs/latest/rules/no-this-before-super) |
| Oxlint | `no-this-before-super` | yes | no | plugin `eslint`, category correctness | [docs](https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-this-before-super.html) |
| Biome | `correctness/noUnreachableSuper` | yes | no | group correctness, since 1.0.0 | [docs](https://biomejs.dev/linter/rules/no-unreachable-super/) |

## Code examples

### Incorrect: the rule reports this

```js
class A1 extends B {
    constructor() {
        this.a = 0;
        super();
    }
}

class A2 extends B {
    constructor() {
        this.foo();
        super();
    }
}

class A3 extends B {
    constructor() {
        super.foo();
        super();
    }
}

class A4 extends B {
    constructor() {
        super(this.foo());
    }
}
```

### Correct: the rule accepts this

```js
class A1 {
    constructor() {
        this.a = 0; // OK, this class doesn't have an `extends` clause.
    }
}

class A2 extends B {
    constructor() {
        super();
        this.a = 0; // OK, this is after `super()`.
    }
}

class A3 extends B {
    foo() {
        this.a = 0; // OK. this is not in a constructor.
    }
}
```

Examples from the ESLint documentation.

## Enable it

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

```js
export default [
  {
    rules: {
      "no-this-before-super": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "rules": {
    "no-this-before-super": "error"
  }
}
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "correctness": {
        "noUnreachableSuper": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [ESLint recommended](https://lintradar.dev/presets/eslint-recommended.md) | ESLint | `@eslint/js` | 64 | 178.8M | +25.9% |
| [Oxlint default](https://lintradar.dev/presets/oxlint-default.md) | Oxlint | `oxlint` | 111 | 50.8M | +183.6% |
| [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% |
| [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% |
| [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% |
| [Google](https://lintradar.dev/presets/google.md) | ESLint | `eslint-config-google` | 60 | 646.4K | +18.9% |
| [eslint-config-love](https://lintradar.dev/presets/love.md) | ESLint | `eslint-config-love` | 258 | 171.7K | +39.3% |
| [Alloy](https://lintradar.dev/presets/alloy.md) | ESLint | `eslint-config-alloy` | 166 | 31.4K | +32.4% |

## Related rules

- [eslint/no-extra-boolean-cast](https://lintradar.dev/rules/eslint/no-extra-boolean-cast.md): Disallow unnecessary boolean casts
- [eslint/no-irregular-whitespace](https://lintradar.dev/rules/eslint/no-irregular-whitespace.md): Disallow irregular whitespace
- [eslint/no-debugger](https://lintradar.dev/rules/eslint/no-debugger.md): Disallow the use of `debugger`
- [eslint/no-unsafe-negation](https://lintradar.dev/rules/eslint/no-unsafe-negation.md): Disallow negating the left operand of relational operators
- [eslint/no-unreachable](https://lintradar.dev/rules/eslint/no-unreachable.md): Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements
- [eslint/no-async-promise-executor](https://lintradar.dev/rules/eslint/no-async-promise-executor.md): Disallow using an async function as a Promise executor

---

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