Skip to content
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

[FEATURE REQUEST] Add options to no-useless-rest-spread rule #59

Closed
gauthieramano opened this issue Mar 7, 2023 · 1 comment
Closed
Labels

Comments

@gauthieramano
Copy link

gauthieramano commented Mar 7, 2023

I opened this issue in the original repository:

Maybe it has more its place here now, as this fork seems to be better maintained.

In short, it would be great if this rule could be disabled for arguments in function declarations, like so:

"mysticatea/no-useless-rest-spread": ["error", { "ignoreFunctionArgs": true }],

So this:

const foo = (...[a, b]: SomeTuple) => { /* something */ };

won't be auto-fixed by this:

const foo = (a, b) => { /* something */ };

and no typing will be lost anymore.

Note:

Called functions shouldn't be concerned.
So, this:

foo(...[a, b, c]);

should stay auto-fixed like so:

foo(a, b, c);

(because there's no reason to cast variables passed to a function)

@github-actions
Copy link

This issue has been automatically closed because we haven't received a response from the original author 🙈. This automation helps keep the issue tracker clean from issues that aren't actionable. Please reach out if you have more information for us! 🙂

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant