We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
prefer-set-has
1 parent d6cfdee commit 4bee9fbCopy full SHA for 4bee9fb
docs/rules/prefer-set-has.md
@@ -9,8 +9,8 @@ This rule is fixable.
9
```js
10
const array = [1, 2, 3];
11
12
-function isExists(find) {
13
- return array.includes(find);
+function hasValue(value) {
+ return array.includes(value);
14
}
15
```
16
@@ -19,16 +19,16 @@ function isExists(find) {
19
20
const set = new Set([1, 2, 3]);
21
22
23
- return set.has(find);
+ return set.has(value);
24
25
26
27
28
const array = [1, 2];
29
30
31
32
33
34
array.push(3);
0 commit comments