-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
prefer-rest-params warns when using arguments.callee.name #6835
Comments
Hey @krainboltgreene, thanks for reaching out! @mysticatea this seems similar to #5990, as in, it would also be a relaxing enhancement if accepted. What do you think? |
100%, that seems absolutely right. Should I close? |
@krainboltgreene Sorry if I wasn't clear, I think this is another false-positive that needs to be taken care of, #5990 deals with a different false-positive, so we should keep this issue open. Just wanted to loop @mysticatea in since he is championing #5990 and probably has an opinion on this issue as well. |
@krainboltgreene is that the complete source code you used or was that in a function? (We need a complete example to verify.) Also, please provide the actual ESLint output, not just a description. Thanks! |
Updated with actual code, but I believe using that anywhere would get you the linter error. |
Looks like the |
Yes, this is very similar to #5990. // ✘
arguments[1] // ← a property access to a number.
arguments[v] // ← a property access to a number possibly.
arguments // ← a use of whole arguments.
// ✔ GOOD
arguments.length
arguments.callee
arguments.foo |
@mysticatea thanks for the update! In that case, I think we can indeed close this issue in favor of #5990. @krainboltgreene please follow #5990 for updates on the fix. Thanks for the report and your support! Closing this, please re-open if anyone disagrees. |
What version of ESLint are you using? 2
What parser (default, Babel-ESLint, etc.) are you using? babel
Please show your full configuration: It's really long.
What did you do? Please include the actual source code causing the issue. I wrote the code:
What did you expect to happen?
Nothing.
What actually happened? Please include the actual, raw output from ESLint.
I got a linter error from
prefer-rest-params
, because I was using arguments. I don't believe there's a way to write what I did without calling arguments.The text was updated successfully, but these errors were encountered: