We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
no-useless-rest-spread
It would be great if this rule could be disabled for arguments in function declarations (it seems to be the most relevant case I encounter), like:
"mysticatea/no-useless-rest-spread": ["error", { "ignoreFunctionArgs": true }],
In TypeScript, we can type the arguments of a function like so:
// Let's consider that this type is used many times in a codebase type SomeTuple = [a: string, b: number]; const foo = (...[a, b]: SomeTuple) => { // someting };
(Note: I took a simple example, but it's not rare having to use the spread syntax to type variables in order to be DRY)
As no-useless-rest-spread rule is auto-fixable, if we don't pay attention, we get this (on save for instance):
// both arguments are now typed as `any` const foo = (a, b) => { // something };
It's annoying having to:
// eslint-disable-next-line mysticatea/no-useless-rest-spread
eslint --fix .
typescript-eslint/typescript-eslint
mysticatea
eslint-community/eslint-plugin-mysticatea
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It would be great if this rule could be disabled for arguments in function declarations (it seems to be the most relevant case I encounter), like:
In TypeScript, we can type the arguments of a function like so:
(Note: I took a simple example, but it's not rare having to use the spread syntax to type variables in order to be DRY)
As
no-useless-rest-spread
rule is auto-fixable, if we don't pay attention, we get this (on save for instance):It's annoying having to:
// eslint-disable-next-line mysticatea/no-useless-rest-spread
everywhere this case occurseslint --fix .
Notes:
typescript-eslint/typescript-eslint
repository (but it won't go anywhere):no-useless-rest-spread
in a better way thanmysticatea
typescript-eslint/typescript-eslint#6565eslint-community/eslint-plugin-mysticatea
repository:no-useless-rest-spread
rule eslint-community/eslint-plugin-mysticatea#59The text was updated successfully, but these errors were encountered: