jsdoc/no-blank-blocks 风格
功能
报告并可选择性地移除仅包含空白字符的块。
为什么这是不好的?
空白 JSDoc 块会增加噪音,却不提供任何文档。
示例
此规则的错误代码示例:
js
/** */
/**
*
*/此规则的正确代码示例:
js
/** @tag */
/**
* Text
*/
/**
* @tag
*/配置
此规则接受一个包含以下属性的配置对象:
enableFixer
类型:boolean
默认值:false
是否自动移除空白 JSDoc 块。
如何使用
To enable this rule using the config file or in the CLI, you can use:
json
{
"plugins": ["jsdoc"],
"rules": {
"jsdoc/no-blank-blocks": "error"
}
}ts
import { defineConfig } from "oxlint";
export default defineConfig({
plugins: ["jsdoc"],
rules: {
"jsdoc/no-blank-blocks": "error",
},
});bash
oxlint --deny jsdoc/no-blank-blocks --jsdoc-plugin版本
此规则在 v1.78.0 中添加。
