How to disable 'Unused import'-warnings on

2019-07-19 20:58发布

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/

2条回答
孤傲高冷的网名
2楼-- · 2019-07-19 21:17

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

查看更多
Lonely孤独者°
3楼-- · 2019-07-19 21:22

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.

查看更多
登录 后发表回答