New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
explicit-length-check
: Check Set#size
#958
Comments
I am new with JavaScript, but i would like to help with this issue. I can? |
Go ahead. |
Thanks, I have a question, where is the set#size rule? I already looked for it in the comment file and I can't find it. |
I am working on the issue, I would like to ask some questions, can I? |
Shot |
As I understand, in base of the comment in the #952, you tell two improvements for the rule "explicit-length-check" , located in the file 'eslint-plugin-unicorn/rules/explicit-length-check.js', one of these is remove the option >=1 and the other is make the rule work for Set#size. The first one I understand, if I'm not wrong, is only remove the option 'greater-than-or-equal' in the Map and in the function getLengthCheckNode. The second improve I don't understand completely well, but after analyzing it I concluded that you mean is that based on a given Set then instead of just checking non-zero, also check according of the Set values, for example, greater than 5, greater than 6 and so on. I'm right? |
Make
explicit-length-check
rule work forSet#size
We can't tell
foo
infoo.size
is aSet
, but it seems safe to assume.size
is aninteger
.Ref: #952 (comment)
The text was updated successfully, but these errors were encountered: