Ionic 3.5.3 a lot warning about unused imports


Hello, recently I have updated my ionic project, but now I see a lot of warnings like this:

[17:03:08] tslint: src/shared/components/avatar/index.ts, line: 1
’ChangeDetectorRef’ is declared but never used.

   L1:  import { Component, Input, ChangeDetectionStrategy, ChangeDetectorRef, OnInit, OnDestroy } from '@angular/co
   L2:  import { DataStore } from 'js-data';

But I use that import:


  • Constructor
    private events: Events,
    private api: DataStore,
    private ref: ChangeDetectorRef)

The questions is why ionic thinks that it not used import?

Tslint:warning All imports are unused

i have same question


The warning is generated by the tslint run of the build process by @ionic/app-scripts, not Ionic Framework directly.

First: Does this affect your app or is it just a jslint warning?

Post your ionic info output please.


Maybe I have wrong ts configs?


“compilerOptions”: {
“allowSyntheticDefaultImports”: true,
“declaration”: false,
“emitDecoratorMetadata”: true,
“experimentalDecorators”: true,
“lib”: [
“module”: “es2015”,
“moduleResolution”: “node”,
“sourceMap”: true,
“target”: “es5”,
“baseUrl”: “src”,
“paths”: {
“assets/": [ "assets/” ],
“pages/": [ "pages/” ],
“services/": [ "services/” ],
“shared/": [ "shared/” ]
“include”: [
“exclude”: [
“compileOnSave”: false,
“atom”: {
“rewriteTsconfig”: false


“rules”: {
“no-duplicate-variable”: true,
“no-unused-variable”: [
“ignore-pattern”: “Page$”
“rulesDirectory”: [


Compare it to the default ones:

Also post your ionic info output and package.json please.


I am having the same issue. It seems like this was caused by the recent appscripts release. Apparently they are working to fix that, though.


Is there an issue already to link to?


Not that I know of. I found one but seems to be just one of the issues: