简体   繁体   English

Tslint升级中的错误

[英]error in Tslint upgrading

Hi I am unable to get through this error please help me with this error and I have tried sudo apt-get install nodejs legacy and etc but was not able to find the solution 嗨,我无法解决此错误,请帮助我解决此错误,我尝试了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

The no-trailing-comma rule was removed, it has been replaced by the trailing-comma rule (#687) 删除了无尾逗号规则,已将其替换为尾逗号规则(#687)

EDIT: In your /tslint.json file remove the use of "no-trailing-comma". 编辑:在您的/tslint.json文件中,删除“ no-trailing-逗号”的使用。 It can be replaced with the new "trailing-comma" rule which you can find more about here: https://palantir.github.io/tslint/rules/trailing-comma/ 可以将其替换为新的“ trailing-逗号”规则,您可以在此处找到更多信息: https : //palantir.github.io/tslint/rules/trailing-comma/

The new rule adds options for multiline and singleline, which can be "always" or "never": 新规则为多行和单行添加了选项,可以“始终”或“从不”:

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

If you just want to turn it off you can add this: 如果只想将其关闭,则可以添加以下内容:

"trailing-comma": [false],

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Typescript - 在 createReducer 上出现 tslint 错误 - Typescript - getting tslint error on createReducer 尝试使用 React + TypeScript 项目修复 tslint 错误 - Trying to fix tslint error with React + TypeScript project tslint创建错误,但是功能明智地正常工作 - tslint creating error but functionality wise its working fine gulp测试:插件“ gulp-tslint-log”中的错误 - gulp test: Error in plugin 'gulp-tslint-log' @property of an object,tslint 给出错误 - no-redundant-jsdoc - @property of an object, tslint gives error - no-redundant-jsdoc ReactJs中的Antd Carousel上的TSLint错误“属性&#39;carousel&#39;不存在” - TSLint Error "Property 'carousel' does not exist" on Antd Carousel in ReactJs TSLint错误“通过此简单迭代,预期了&#39;for-of&#39;循环而不是&#39;for&#39;循环” - TSLint Error “Expected a 'for-of' loop instead of a 'for' loop with this simple iteration” 如何用单个道具用括号修复更漂亮和更薄的错误? - How to fix prettier and tslint error with brackets with single props? WebStorm修复所有TSLint错误正在修复除一个以外的所有错误 - WebStorm fixing all TSLint error is fixing all but one 这可能是什么? [TsLint 错误:“必须适当处理 Promise”] - What could this be about? [TsLint Error: “Promises must be handled appropriately”]
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM