How to tell eslint that you prefer single quotes around strings

I am new to eslint and it is throwing up a ton of errors telling me to use double quotes:

error Strings must use doublequote 

This is not my preference. I have a basics based .eslintrc file:

 { "env": { "node": 1 } } 

I would like to configure it for single quotes.

+5
source share
1 answer

http://eslint.org/docs/rules/quotes.html

 { "env": { "node": 1 }, "rules": { "quotes": [2, "single", { "avoidEscape": true }] } } 
+8
source

Source: https://habr.com/ru/post/1216332/


All Articles