Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable quote rule in Eslint config file

I could only find rules to show errors for a double quote, single quote, or backticks. Couldn't find a rule to fully disable this quote error. I don't want to see an error no matter what quote is being used in a project.

like image 922
Akhil C Avatar asked Dec 30 '25 07:12

Akhil C


2 Answers

There are two options. You can add these rules inside eslintrc.json

"avoidEscape": true allows strings to use single-quotes or double-quotes so long as the string contains a quote that would have to be escaped otherwise

"allowTemplateLiterals": true allows strings to use backticks

the reference here: https://eslint.org/docs/rules/quotes

like image 139
ArtDev Avatar answered Jan 01 '26 01:01

ArtDev


Hi You can use this rule in the .eslintrc.json file

{
...
   "rules": {
      ...
      "avoidEscape": true,
      "allowTemplateLiterals": true
   }
...
}
like image 32
Modi Mohammed Avatar answered Dec 31 '25 23:12

Modi Mohammed