Skip to content

Commit

Permalink
docs: fix restrict-plus-operands example (#8362)
Browse files Browse the repository at this point in the history
* delete restrict-plus-operands example

* fix restrict-plus-operands example
  • Loading branch information
nobuaki0331 committed Feb 7, 2024
1 parent 7c0da9c commit b636baa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/eslint-plugin/docs/rules/restrict-plus-operands.md
Expand Up @@ -18,15 +18,15 @@ This rule reports when a `+` operation combines two values of different types, o
### ❌ Incorrect

```ts
let foo = '5.5' + 5;
let foo = 1n + 1;
let fn = (a: string, b: never) => a + b;
```

### ✅ Correct

```ts
let foo = parseInt('5.5', 10) + 10;
let foo = 1n + 1n;
let fn = (a: string, b: string) => a + b;
```

## Options
Expand Down

0 comments on commit b636baa

Please sign in to comment.