Skip to content

Files

Latest commit

 

History

History
42 lines (31 loc) · 698 Bytes

deny-element.md

File metadata and controls

42 lines (31 loc) · 698 Bytes

@rdlabo/rules/deny-element

This plugin disallows the use of certain HTML tags.

Inline Modal and Inline ActionSheet from Ionic6. However, since my team uses Controller uniformly, I created a rule to prevent accidental Inline.

Rule Details

Disallow the use of elements configured in .eslintrc.json.

example:

{
  "rules": {
    "@rdlabo/rules/deny-element": [
      "error",
      {
        "elements": ["ion-modal"]
      }
    ]
  }
}
<ion-modal></ion-modal>
<!-- error -->

Options

const options: {
  elements: string[];
};

Implementation