Appearance
此规则不允许使用 tslint:<rule-flag> 注释。
tslint:<rule-flag>
在从 TSLint 迁移到 ESLint 时很有用。一旦 TSLint 已被移除,此规则有助于定位 TSLint 注释。
此规则的错误代码示例:
// tslint:disable-next-line someCode();
此规则的正确代码示例:
someCode();
To enable this rule using the config file or in the CLI, you can use:
{ "rules": { "typescript/ban-tslint-comment": "error" } }
import { defineConfig } from "oxlint"; export default defineConfig({ rules: { "typescript/ban-tslint-comment": "error", }, });
oxlint --deny typescript/ban-tslint-comment
此规则在 v0.2.9 中添加。
typescript/ban-tslint-comment Style
作用
此规则不允许使用
tslint:<rule-flag>注释。为什么这不好?
在从 TSLint 迁移到 ESLint 时很有用。一旦 TSLint 已被移除,此规则有助于定位 TSLint 注释。
示例
此规则的错误代码示例:
此规则的正确代码示例:
如何使用
To enable this rule using the config file or in the CLI, you can use:
版本
此规则在 v0.2.9 中添加。
参考资料