0.4.0 • Published 26 days ago

@rdlabo/eslint-plugin-rules v0.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
26 days ago

@rdlabo/eslint-plugin-rules

This is a public version of the eslint rules I use in the app I created with Ionic Angular.

Installation

npm install @rdlabo/eslint-plugin-rules --save-dev

If your project does not install @angular-eslint packages, please do so: https://github.com/angular-eslint/angular-eslint

Configuration (legacy: .eslintrc*)

Recommend settings is here:

  {
    ...
+   "plugins": ["@rdlabo/rules"],
    "overrides": [
      {
        "files": [
          "*.ts"
        ],
      ...
        "rules": {
+         "@rdlabo/rules/deny-constructor-di": "error",
+         "@rdlabo/rules/import-inject-object": "error",
+         "@rdlabo/rules/deny-import-from-ionic-module": "error",
+         "@rdlabo/rules/implements-ionic-lifecycle": "error",
+         "@rdlabo/rules/deny-soft-private-modifier": "error",
        }
      },
      {
        "files": [
          "*.html"
        ],
        "rules": {
+         "@rdlabo/rules/deny-element": [
+           "error",
+           {
+             "elements": [
+               "ion-modal",
+               "ion-popover",
+               "ion-toast",
+               "ion-alert",
+               "ion-loading",
+               "ion-picker",
+               "ion-action-sheet"
+             ]
+           }
+         ]
          ]
        }
      }
    ]
  }

List of supported rules

ruledescriptionauto fix
@rdlabo/rules/deny-constructor-diThis plugin disallows Dependency Injection within the constructor.
@rdlabo/rules/import-inject-objectThis plugin automatically imports when inject is used but not imported.
@rdlabo/rules/deny-elementThis plugin disallows the use of certain HTML tags.
@rdlabo/rules/deny-import-from-ionic-moduleThis plugin disallows import from @ionic/angular
@rdlabo/rules/implements-ionic-lifecycleThis plugin checks the implementation of the Ionic lifecycle.
@rdlabo/rules/deny-soft-private-modifierThis plugin disallows the use of soft private modifier.
0.4.0

26 days ago

0.3.0

2 months ago

0.3.2

2 months ago

0.3.1

2 months ago

0.3.3

2 months ago

0.2.3

5 months ago

0.2.4

5 months ago

0.2.1

5 months ago

0.2.2

5 months ago

0.2.0

5 months ago

0.1.1

1 year ago

0.1.0

1 year ago