gpt4 book ai didi

javascript - Tslint 升级错误

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:09:34 26 4
gpt4 key购买 nike

嗨,我无法解决这个错误,请帮助我解决这个错误,我已经尝试过 sudo apt-get install nodejs legacy 等,但找不到解决方案

       TS    build-rt
/home/gautam/sd.js-master/node_modules/tslint/lib/ruleLoader.js:29
throw new Error(ERROR_MESSAGE);
^

Error:
Could not find implementations for the following rules specified in the configuration:
no-trailing-comma
Try upgrading TSLint and/or ensuring that you have all necessary custom rules installed.
If TSLint was recently upgraded, you may have old rules configured which need to be cleaned up.

at Object.loadRules (/home/gautam/sd.js-master/node_modules/tslint/lib/ruleLoader.js:29:15)
at Linter.lint (/home/gautam/sd.js-master/node_modules/tslint/lib/tslint.js:59:44)
at processFile (/home/gautam/sd.js-master/node_modules/tslint/lib/tslint-cli.js:138:29)
at /home/gautam/sd.js-master/node_modules/tslint/lib/tslint-cli.js:177:74
at Array.forEach (native)
at Object.<anonymous> (/home/gautam/sd.js-master/node_modules/tslint/lib/tslint-cli.js:177:41)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
make: *** [build-rt] Error 1

最佳答案

无尾随逗号规则已被删除,它已被尾随逗号规则取代 (#687)

编辑:在您的/tslint.json 文件中删除“no-trailing-comma”的使用。它可以替换为新的“尾随逗号”规则,您可以在此处找到更多信息:https://palantir.github.io/tslint/rules/trailing-comma/

新规则增加了多行和单行的选项,可以是“总是”或“从不”:

"trailing-comma": [true,
{
"multiline": "always",
"singleline": "never"
}
],

如果你只是想关闭它,你可以添加这个:

"trailing-comma": [false],

关于javascript - Tslint 升级错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39791170/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com