jsdoc/require-param-name Pedantic
它的作用
要求所有 @param 标签都必须有名称。
为什么这不好?
应该记录参数的名称。
示例
此规则的错误代码示例:
javascript
/** @param {SomeType} */
function quux(foo) {}此规则的正确代码示例:
javascript
/** @param {SomeType} foo */
function quux(foo) {}如何使用
To enable this rule using the config file or in the CLI, you can use:
json
{
"plugins": ["jsdoc"],
"rules": {
"jsdoc/require-param-name": "error"
}
}ts
import { defineConfig } from "oxlint";
export default defineConfig({
plugins: ["jsdoc"],
rules: {
"jsdoc/require-param-name": "error",
},
});bash
oxlint --deny jsdoc/require-param-name --jsdoc-plugin版本
此规则是在 v0.4.3 中添加的。
