Closed HenryGessau closed 11 months ago
I don't see the need for a new rule
key-quoted-strings
just for keys, moreover in such a scenario the rulequoted-strings
should then be renamedvalue-quoted-strings
. In my opinion the required quote type will always be the same (nobody wants'
for keys and"
for values), so what about usingquoted-strings
for all quoted strings (whatever their position)? It would also avoid a lot of code duplication.
I came across a project where they want quotes to be required if there is a $
in value strings, but not quoted for $
in key strings. That was the only reason why I proposed support for separate quoting rules for keys, but now that I think about it, that's a rather esoteric style. (If there is real demand, such styles could be perhaps supported later by adding keys-extra-required
and values-extra-required
options to the existing rule.)
I'll pare this PR down to remove the key-quoted-strings
rule. And, yes, I will squash the commits.
@adrienverge I have updated this for your review.
@adrienverge I don't see how the CI errors are related to my change?
Closes #617