You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rules/prefer-set-has.js
+19-5Lines changed: 19 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -9,22 +9,36 @@ const messages = {
9
9
[MESSAGE_ID_SUGGESTION]: 'Switch `{{name}}` to `Set`.',
10
10
};
11
11
12
-
constarrayMethodsReturnsArray=[
13
-
'concat',
12
+
/*
13
+
Some of these methods can be `Iterator`.
14
+
15
+
Since `Iterator` don't have an `includes()` method, we are safe to assume they are array. Except `concat` and `slice` which can be a string: https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2216
0 commit comments