> 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-symbol

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


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

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

## Rule Details

Disallows `new Symbol()`. `Symbol` is not intended to be used with the `new` operator, but to be called as a function. Calling `new Symbol()` throws a `TypeError` at runtime because `Symbol` is not a constructor.

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

```javascript
var foo = new Symbol('foo');
new Symbol();
```

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

```javascript
var foo = Symbol('foo');
```

## Original Documentation

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