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
chore(eslint): Turn on quotes rules #4671
Conversation
> Enforces the consistent use of either backticks, double, or single quotes. https://eslint.org/docs/rules/quotes Enforces single quotes - which matches our prettier conventions.
size-limit report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a good change to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this make Prettier do the `...` -> '...'
fix automatically, the way it does with "..."
-> '...'
? I think no, though, right? This just makes elsint get mad? If so, maybe https://github.com/prettier/prettier-eslint could be rigged to make prettier actually fix this.
P.S. Apparently GH can't handle backticks, even escaped ones, inside of backticks.
No it doesn't, but the nice thing is that eslint can auto-fix this. Running |
Just for posterity - actually, prettier does seem to auto-fix this when you save in VSCode. ¯\(ツ)/¯ That said, the fact that every time I add a string to any file, it yells at me until I save and have it fix it (because I am in a forever-habit of using double quotes, which I can't seem to break) is less great, but... Long run, in our copious free time, it'd be great if we could figure out how to solve the original problem (non-template strings using backticks) without making it as anxious about it as it now is. |
https://eslint.org/docs/rules/quotes
Enforces single quotes - which matches our prettier conventions.