# no-unnecessary-qualifier

Rule `typescript/no-unnecessary-qualifier`. Disallow unnecessary namespace qualifiers

- Source: typescript
- Technologies: TypeScript
- Kind: style
- Needs type information: yes
- Autofix: yes, in at least one linter
- Reach: 2.6M weekly downloads of presets that enable it
- Trend: +92.2% last quarter
- Rank: #1471 by reach, #281 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `@typescript-eslint/no-unnecessary-qualifier` | no | safe | package `@typescript-eslint/eslint-plugin` | [docs](https://typescript-eslint.io/rules/no-unnecessary-qualifier) |
| Oxlint | `typescript/no-unnecessary-qualifier` | no | no | plugin `typescript`, category style | [docs](https://oxc.rs/docs/guide/usage/linter/rules/typescript/no-unnecessary-qualifier.html) |
| Biome | `nursery/noUselessQualifier` | no | unsafe | group nursery, since 2.6.7 | [docs](https://biomejs.dev/linter/rules/no-useless-qualifier/) |

## Code examples

### Incorrect: the rule reports this

```ts
enum A {
  B,
  C = A.B,
}
```

```ts
namespace A {
  export type B = number;
  const x: A.B = 3;
}
```

### Correct: the rule accepts this

```ts
enum A {
  B,
  C = B,
}
```

```ts
namespace A {
  export type B = number;
  const x: B = 3;
}
```

Examples from the ESLint documentation.

## Enable it

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

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

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

### Oxlint: `.oxlintrc.json`

```json
{
  "rules": {
    "typescript/no-unnecessary-qualifier": "error"
  }
}
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "noUselessQualifier": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Ultracite for Oxlint](https://lintradar.dev/presets/ultracite-oxlint.md) | Oxlint | `ultracite` | 475 | 2.1M | +151.7% |
| [XO](https://lintradar.dev/presets/xo.md) | ESLint | `eslint-config-xo` | 618 | 413K | −5.0% |
| [eslint-config-love](https://lintradar.dev/presets/love.md) | ESLint | `eslint-config-love` | 258 | 171.7K | +39.3% |

## Related rules

- [typescript/prefer-includes](https://lintradar.dev/rules/typescript/prefer-includes.md): Enforce `includes` method over `indexOf` method
- [typescript/prefer-readonly](https://lintradar.dev/rules/typescript/prefer-readonly.md): Require private members to be marked as `readonly` if they're never modified outside of the constructor
- [typescript/prefer-nullish-coalescing](https://lintradar.dev/rules/typescript/prefer-nullish-coalescing.md): Enforce using the nullish coalescing operator instead of logical assignments or chaining
- [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
- [typescript/strict-boolean-expressions](https://lintradar.dev/rules/typescript/strict-boolean-expressions.md): Disallow certain types in boolean expressions
- [typescript/non-nullable-type-assertion-style](https://lintradar.dev/rules/typescript/non-nullable-type-assertion-style.md): Enforce non-null assertions over explicit type assertions

---

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