Enhancement: [no-misused-spread] Option to allow string literals #10954
Labels
awaiting response
Issues waiting for a reply from the OP or another party
enhancement: plugin rule option
New rule option for an existing eslint-plugin rule
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Before You File a Proposal Please Confirm You Have Done The Following...
My proposal is suitable for this project
Link to the rule's documentation
https://typescript-eslint.io/rules/no-misused-spread/
Description
The
allow
option of this rule can be configured to allow spreading strings with{ from: 'lib', name: 'string' }
, but this does not cover string literals, and there is no way to specify things like "any string literal" using this option.I propose that we add an option like
allowStringLiterals
in addition toallow
(or make it possible to specify "any string literal" withTypeOrValueSpecifier
), which allows spreading of just string literals.Fail
Pass
Additional Info
No response
The text was updated successfully, but these errors were encountered: