如何在 tslint 中使用 npm 警告?
How to use npm warnings in tslint?
我是 tslint 的新手,过去我对 javascript 个文件使用 eslint,现在我想使用 tslint 作为我的 typescript linting 工具。
问题是使用 eslint 我能够指定我的一些错误被指定为 NPM 警告,在本例中是控制台日志记录。
如您所见,我的 "warnings" 正在抛出一个 npm ERR,有没有办法告诉它应该是 npm WARN???
要更改规则的严重性,必须将对象用作规则设置。
{
// ...
"rules": {
"no-console": {
"options": [true, "log"],
"severity": "warning"
}
}
}
您可能还希望关注此 link to the documentation。
我是 tslint 的新手,过去我对 javascript 个文件使用 eslint,现在我想使用 tslint 作为我的 typescript linting 工具。
问题是使用 eslint 我能够指定我的一些错误被指定为 NPM 警告,在本例中是控制台日志记录。
如您所见,我的 "warnings" 正在抛出一个 npm ERR,有没有办法告诉它应该是 npm WARN???
要更改规则的严重性,必须将对象用作规则设置。
{
// ...
"rules": {
"no-console": {
"options": [true, "log"],
"severity": "warning"
}
}
}
您可能还希望关注此 link to the documentation。