不允许使用`@ts-<directional>`格式的注释,或要求在注释后进行补充说明。
// code-linter.json5 { "rules": { "@typescript-eslint/ban-ts-comment": "error" } }
详情请参考@typescript-eslint/ban-ts-comment选项。
console.log('hello');
// @ts-expect-error console.log('hello'); /* @ts-expect-error */ console.log('hello');
plugin:@typescript-eslint/all
Code Linter代码检查规则的配置指导请参考Code Linter代码检查。