Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 997 Bytes

deny-import-from-ionic-module.md

File metadata and controls

32 lines (20 loc) · 997 Bytes

@rdlabo/rules/deny-import-from-ionic-module

This plugin prevents accidental imports from @ionic/angular instead of @ionic/angular/standalone.

  • ✒️ The --fix option on the command line can automatically fix some of the problems reported by this rule.

Mixed use of @ionic/angular and @ionic/angular/standalone is not allowed. If this is the case, the build will not show any errors, but will not work without errors when running in a browser.

To prevent this, we prevent incorrect imports.

Rule Details

Deny: import from @ionic/angular.

import { ModalController } from '@ionic/angular';

Allow: import from @ionic/angular/standalone.

import { ModalController } from '@ionic/angular/standalone';

Options

No Options.

Implementation