Avoid tslint warnings (All imports are unused)

Hello Experts


  • IONIC 3

  • ionic serve works perfectly.

  • the console shows
    [13:12:53] tslint: src/pages/login/login.ts, line: 2
    All imports are unused.

     L1:  import { Component } from '@angular/core';
     L2:  import { NgForm } from '@angular/forms';


  • Avoid tslint warnings

I would appreciate any help.


Although it could be annoying, I wouldn’t recommend turning it off. But if you insist, I suppose you should take a look at the settings over here:


Thanks a lot.
It is clear.

Does it hurt the app to have unused imports?
I only see no-unused-variable nothing specific to imports only?
It would be nice to have some ignore-unused-imports per file as a comment.
I tend to have a bunch of pages in app.components.ts I like to hook into for testing / short-cutting the default app workflow.