Skip to content

Commit 4bee9fb

Browse files
authored
Clarify variable names in prefer-set-has rule doc (#676)
1 parent d6cfdee commit 4bee9fb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/rules/prefer-set-has.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ This rule is fixable.
99
```js
1010
const array = [1, 2, 3];
1111

12-
function isExists(find) {
13-
return array.includes(find);
12+
function hasValue(value) {
13+
return array.includes(value);
1414
}
1515
```
1616

@@ -19,16 +19,16 @@ function isExists(find) {
1919
```js
2020
const set = new Set([1, 2, 3]);
2121

22-
function isExists(find) {
23-
return set.has(find);
22+
function hasValue(value) {
23+
return set.has(value);
2424
}
2525
```
2626

2727
```js
2828
const array = [1, 2];
2929

30-
function isExists(find) {
31-
return array.includes(find);
30+
function hasValue(value) {
31+
return array.includes(value);
3232
}
3333

3434
array.push(3);

0 commit comments

Comments
 (0)