How to tell eslint that you prefer single quotes around your strings

前端 未结 1 1977
时光说笑
时光说笑 2021-02-11 18:36

I\'m new to eslint and it\'s spewing out a ton of errors telling me to use doublequotes:

error  Strings must use doublequote

That\'s not my pre

1条回答
  •  生来不讨喜
    2021-02-11 19:22

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

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

    0 讨论(0)
提交回复
热议问题