0.2.2 • Published 1 year ago

@svg-zentrale/eslint-plugin v0.2.2

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

svg-lint-rules

This repository contains the npm package @svg-zentrale/eslint-plugin. With this package as eslint plugin you can use custom ESLint rules written by and for SVG Bundes-Zentralgenossenschaft Straßenverkehr eG.

Currently it contains two @ngneat/until-destroy related rules:

  • until-destroy-import
    • Checks that when importing untilDestroyed you also import UntilDestroy and vice versa (using both in file)
  • until-destroyed-for-subscriptions
    • Checks that untilDestroyed is used for all subscriptions in lifecycle components/directives/pipes which may be destroyed at one point

How to use

To use the plugin install it as dev dependancy via

npm install @svg-zentrale/eslint-plugin --save-dev

or

yarn add @svg-zentrale/eslint-plugin --dev

Next add @svg-zentrale to the list of your plugins within your .eslintrc.json

So the line which might look like this

"plugins": ["@typescript-eslint"],

becomes

"plugins": ["@typescript-eslint", "@svg-zentrale"],

Then add the rules themselves to your .eslintrc rules via

"@svg-zentrale/until-destroy-import": "error",
"@svg-zentrale/until-destroyed-for-subscriptions": "error"
0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago