how to override extended eslint config
hi i am using antfu's eslint config (https://github.com/antfu/eslint-config). here's my
.eslintrc.cjs
now i want to override a rule to use double quotes instead of single quotes. the readme says i can override it by adding it to a rules
field. so i added it like this:
but instead of overriding, its actually enforcing both the rules.
https://this-vegetable.is-from.space/Code_53HG4zHeSp.gif11 Replies
how do i fix this
this seems like a syntax error https://this-vegetable.is-from.space/Code_8B8veAoVdC.png
hmm now there's no errors but there's also no errors for using single quotes
don't think its working :(
lemme try adding the files thing
okay now its allowing both single and double quotes
eslint is so weird <:P_veryweary:827162432778141706>
Solution
looks like his config isn't properly configured
it's fighting with typescript eslint
need to override both rules
@nexxel
that is what eslint-config-prettier is doing for prettier - makes sure the rules aren't conflicting
lemme try that
julius you're a legend
that worked
that makes sense, im not using prettier at all in this project
thank you again
Yea im just saying that he has 2 plugins that conflicts so overriding one makes the other one fail ☺️
is this worth opening an issue/pr for?
Maybe - it certainly decreases the modifiability of the preset