Skip to content
rdlabo.dev

implements-ionic-lifecycle

This plugin recommend to implements Ionic Lifecycle.

  • ⭐️ This rule is included in plugin:@rdlabo/rules/recommended preset.
  • ✒️ The --fix option on the command line can automatically fix some of the problems reported by this rule.

Rule Details

❌ Incorrect: Using Ionic Lifecycle methods without implementing the interface

@Component({
  selector: 'app-confirm',
  templateUrl: './confirm.page.html',
  styleUrls: ['./confirm.page.scss'],
})
export class SigninPage {
  ionViewWillEnter() {}
}

✅ Correct: Using Ionic Lifecycle methods with proper interface implementation

@Component({
  selector: 'app-confirm',
  templateUrl: './confirm.page.html',
  styleUrls: ['./confirm.page.scss'],
})
export class SigninPage implements ionViewWillEnter {
  ionViewWillEnter() {}
}

Options

No Options.

Implementation