如何指定JSDOC规则以识别未使用的参数?
在我的项目中,我有一个无用参数的ESLINT规则,可以通过将领先的下划线添加到参数名称中来沉默:
/**
* Set the outer alternative number for this context node. Default
* implementation does nothing to avoid backing field overhead for
* trees that don't need it. Create
* a subclass of ParserRuleContext with backing field and set
* option contextSuperClass.
*
* @param altNumber The alt number to set.
*/
public setAltNumber = (_altNumber: number): void => {
};
可以覆盖此方法,这就是为什么我希望文档使用参数名称而没有领先的下划线。但是,这与Eslint 规则。
我既不想禁用未使用的参数规则,也不想禁用“要求”规则。我如何满足两者?是否有一个设置可以允许Sircker-Param即使使用领先的下划线也可以检测参数?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在寻找
no-unundus-vars
。package.json
You are looking for the
no-unused-vars
eslint rule.package.json