mindsers / sanpe-bot

The SanPé bot is a Twitch bot built live
https://twitch.tv/mindsers
MIT License
4 stars 2 forks source link

Fix eslint and prettier config #23

Closed Sata51 closed 3 years ago

Sata51 commented 3 years ago

Propose modification for eslint and prettier rule

I'm not sure that's what you want. Single quote are not always used. backtick are replaced by single quote in most case.

mindsers commented 3 years ago

I don't get why "quotes": ["error", "single", { "allowTemplateLiterals": true, "avoidEscape": true }] makes it use double quote...

Sata51 commented 3 years ago

Prettier, is rewritring the code. The avoidEscape just avoid eslint error

mindsers commented 3 years ago

Ok, tested it. If we use template literals we don't have to use double quote and neither prettier nor eslint complains about it

Sata51 commented 3 years ago

Without the avoidEscape, in that case :

"I can't kill you my lord <3 ! mindse4Stop"

eslint keep complains that Strings must use singlequote. If we use this syntax :

`I can't kill you my lord <3 ! mindse4Stop`

This is valid, but prettier rewrite it...

Sata51 commented 3 years ago

I have rewrite the two parts that keep complains about the double quote