console.xxxの使用は禁止されています。 xxxには "log" "error" 等のメソッド名 が入ります。
エラー例
console.log(`test`);
解決方法
-
tslint.jsonの "no-console" 設定を確認し、禁止されていないメソッドに変更します。
tslint.json
warnは設定にないのでエラーにならない{ "rules": { "no-console": [ true, "log", "error", "debug", "info", "time", "timeEnd", "trace" ] }
console.warn(`test`);
-
tslint.jsonの "no-console" 設定に false を指定して無効にするか、使用したいメソッドを削除します。
tslint.json
{ "rules": { "no-console": [ false ] }
検証環境
- typescript 2.6.2
- tslint 5.9.1
- Microsoft Windows 7 Professional Service Pack 1 (Microsoft Windows NT 6.1 (7601))