跳到主要内容

@hw-stylistic/no-tabs

禁止使用tab作为缩进,推荐使用空格。该规则仅检查.ets文件类型。

规则配置

// code-linter.json5
{
"rules": {
"@hw-stylistic/no-tabs": "error"
}
}

选项

该规则无需配置额外选项。

正例

export const message: string = 'Hello World';

反例

export const message: string = 'Hello World';

规则集

"plugin:@hw-stylistic/recommended"
"plugin:@hw-stylistic/all"

Code Linter代码检查规则的配置指导请参考Code Linter代码检查