2016-09-30 159 views
1

嗨,我無法打通這個錯誤,請幫助我這個錯誤,我已經試過命令和apt-get安裝的NodeJS傳統和等,但沒能找到解決錯誤Tslint升級

 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 

回答

2

刪除尾隨逗號規則,它已被尾隨規則(#687)取代

編輯: 在您的/tslint.json文件中刪除使用「no-trailing-comma」。它可以與新的「尾隨逗號」的規則,你可以找到更多關於這裏所取代:https://palantir.github.io/tslint/rules/trailing-comma/

新規則增加了選項,多和單線,它可以是「總是」或者「從不」:

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

如果你只是想關閉它,你可以補充一點:

"trailing-comma": [false], 
+0

好,我已經看到,在github上,但什麼是你tslint.json文件解 –

+0

更改「無尾隨逗號」到「逗號」 – robmcm