强制使用一致的反引号、双引号或单引号风格。
规则配置
// code-linter.json5
{
"rules": {
"@typescript-eslint/quotes": "error"
}
} 正例
export const double = "double";
export const foo = `back
tick`; // backticks are allowed due to newline
反例
// 默认推荐使用双引号
export const single = 'single';
export const unescaped = 'a string containing "double" quotes';
export const backtick = `back\ntick`; // you can use \n in single or double quoted strings