Ionic 3.5.3 Angular lifecycle hooks declared but not used lint errors

Hi everyone. I have updated to 3.5.3 ionic-angular and I am getting a massive stream of linting errors on ionic serve.

‘OnInit’ is declared but never used.
‘AfterViewChecked’ is declared but never used.

Every page and component that uses these is showing errors. App seems to be working fine but I wonder if I should be concerned. I am definitely using the imports using implements OnInit and then declaring ngOnInit functions.

Ionic Info:

global packages:

@ionic/cli-utils : 1.5.0
Cordova CLI      : 7.0.1 
Ionic CLI        : 3.5.0

local packages:

@ionic/app-scripts              : 2.0.2
@ionic/cli-plugin-cordova       : 1.4.1
@ionic/cli-plugin-ionic-angular : 1.3.2
Cordova Platforms               : android 6.2.3 ios 4.4.0
Ionic Framework                 : ionic-angular 3.5.3

System:

Node       : v6.11.0
OS         : macOS Sierra
Xcode      : Xcode 8.3.3 Build version 8E3004b 
ios-deploy : 1.9.1 
ios-sim    : not installed
npm        : 3.10.10 

Anyone else having this issue?

Yes. I’m ignoring it and hoping it goes away in the next release. Not exactly an optimal strategy, but hey.

Maybe opening a ticket for @ionic/app-scripts (which is doing the linting when you build) might be the better choice :wink: *hint (and then post it here so other can upvote…)

I would but I tried to replicate it with a fresh project and of course there are no lint errors using OnInit so it is something with my project which has been in dev since beta 2.0.0. Is it still acceptable to open a ticket without a solid way to reproduce?

1 Like

Of course - it just might be ignored if nobody can reproduce it at all. But when you fix it, you might learn a repro, that you can then add to it or even create a minimal repro project and put it on Github.

on the same ‘ignoring’ strategy…