# no-new-native-nonconstructor

> Disallow `new Symbol()` and `new BigInt()`

`Symbol` and `BigInt` start with a capital letter but aren't constructors. `new Symbol("id")` and `new BigInt(10)` throw a `TypeError` when they run. Call them without `new`.

This rule is on by default in JavaScript files. It's off in TypeScript files, where TypeScript reports the same mistake.

{/* Generated by src/codegen/lint-rule-docs.ts. Do not edit this section. */}

## Configure

On by default as an error. To turn it off:

```toml bunfig.toml
[lint.rules]
"no-new-native-nonconstructor" = "off" # or "warn"
```

{/* End of the generated section. */}

## Examples

Reported:

{/* bad */}
```js
const id = new Symbol("id");
```

{/* bad */}
```js
const total = new BigInt(9007199254740991);
```

Not reported:

{/* good */}
```js
const id = Symbol("id");
const total = BigInt(9007199254740991);
```
