How to disable 'Unused import'-warnings on Ionic2 / Angular2

大城市里の小女人 提交于 2019-12-11 01:29:14

问题


I know there is an option to disable those 'Unused Import' warnings give by tslint when running ionic serve or ionic build. But I have no idea where to put it. Does anyone know? Thanks

[1] https://palantir.github.io/tslint/rules/no-unused-variable/


回答1:


Ok, that was quick.. Like often. I'm looking for days for a solution, but immediately after I post my question here, I find the solution on my own.

So, for all having the same problems during developing, you can set no-unused-variable to false in the file tslint.json.

But don't forget to enable it again when you go to production.




回答2:


go into your tslint.json press ctrl+F, replace true with false



来源:https://stackoverflow.com/questions/40788655/how-to-disable-unused-import-warnings-on-ionic2-angular2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!