强制字符串使用单引号。该规则仅检查.ets文件类型。
// code-linter.json5 { "rules": { "@hw-stylistic/quotes": "error" } }
该规则无需配置选项。
export {a, b}; const a = 'hello'; const b = `hello`;
// Strings must use single quotes. export const a = "hello";
"plugin:@hw-stylistic/recommended" "plugin:@hw-stylistic/all"
Code Linter代码检查规则的配置指导请参考Code Linter代码检查(ArkTS/TS)。