简体   繁体   English

Eslint 双引号得到错误以修复为单引号

[英]Eslint double quotes getting error to fix as single quotes

I am facing issue in " " in ESLinter configuration.我在 ESLinter 配置中的“”中遇到问题。

Currently if it is ' ' single quoted no would be found.. But problem with double string quote.目前,如果它是 ' ' 单引号,则不会找到..但是双字符串引号有问题。

Any luck/ rules for it please help, learner in linter config !!任何运气/规则请帮助,linter config中的学习者!

Disable this rule in your eslint config.在您的 eslint 配置中禁用规则。 You should only be using one type of quotes in your code generally though just for the sake of consistency.通常,您应该只在代码中使用一种类型的引号,但只是为了保持一致性。 This is what the rule would look like in your.eslintrc file:这是您的 .eslintrc 文件中规则的样子:

{
    "rules": {
        "quotes": "off"
    },
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM