# no-dupe-class-members

Rule `typescript/no-dupe-class-members`. Disallow duplicate class members

- Source: typescript
- Technologies: TypeScript
- Kind: suspicious
- Needs type information: no
- Autofix: no
- Reach: 3.5M weekly downloads of presets that enable it
- Trend: +13.2% last quarter
- Rank: #1415 by reach, #1435 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `@typescript-eslint/no-dupe-class-members` | no | no | package `@typescript-eslint/eslint-plugin` | [docs](https://typescript-eslint.io/rules/no-dupe-class-members) |
| Biome | `suspicious/noDuplicateClassMembers` | yes | no | group suspicious, since 1.0.0 | [docs](https://biomejs.dev/linter/rules/no-duplicate-class-members/) |

## Code examples

### Incorrect: the rule reports this

```js
class Foo {
  bar() { }
  bar() { }
}
```

```js
class Foo {
  bar() { }
  get bar() { }
}
```

```js
class Foo {
  bar;
  bar() { }
}
```

### Correct: the rule accepts this

```js
class Foo {
  bar() { }
  qux() { }
}
```

```js
class Foo {
  set bar(value) { }
  get bar() { }
}
```

```js
class Foo {
  bar;
  qux;
}
```

Examples from the Biome documentation.

## Enable it

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

```js
import tseslint from "typescript-eslint";

export default [
  {
    plugins: { "@typescript-eslint": tseslint.plugin },
    rules: {
      "@typescript-eslint/no-dupe-class-members": "error",
    },
  },
];
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "suspicious": {
        "noDuplicateClassMembers": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Airbnb TypeScript](https://lintradar.dev/presets/airbnb-typescript.md) | ESLint | `eslint-config-airbnb-typescript` | 19 | 1.8M | +1.2% |
| [Anthony Fu's config](https://lintradar.dev/presets/antfu.md) | ESLint | `@antfu/eslint-config` | 294 | 758.7K | +49.9% |
| [XO](https://lintradar.dev/presets/xo.md) | ESLint | `eslint-config-xo` | 618 | 413K | −5.0% |
| [neostandard](https://lintradar.dev/presets/neostandard.md) | ESLint | `neostandard` | 95 | 317.6K | +50.2% |
| [eslint-config-love](https://lintradar.dev/presets/love.md) | ESLint | `eslint-config-love` | 258 | 171.7K | +39.3% |

## Related rules

- [eslint/no-dupe-class-members](https://lintradar.dev/rules/eslint/no-dupe-class-members.md): Disallow duplicate class members
- [typescript/no-shadow](https://lintradar.dev/rules/typescript/no-shadow.md): Disallow variable declarations from shadowing variables declared in the outer scope
- [typescript/method-signature-style](https://lintradar.dev/rules/typescript/method-signature-style.md): Enforce using a particular method signature syntax
- [typescript/dot-notation](https://lintradar.dev/rules/typescript/dot-notation.md): Enforce dot notation whenever possible
- [typescript/no-import-type-side-effects](https://lintradar.dev/rules/typescript/no-import-type-side-effects.md): Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers
- [typescript/prefer-find](https://lintradar.dev/rules/typescript/prefer-find.md): Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result

---

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