0.2.4 • Published 6 months ago
@svg-zentrale/eslint-plugin v0.2.4
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
untilDestroyedyou also importUntilDestroyand vice versa (using both in file)
- Checks that when importing
until-destroyed-for-subscriptions- Checks that
untilDestroyedis used for all subscriptions in lifecycle components/directives/pipes which may be destroyed at one point
- Checks that
How to use
To use the plugin install it as dev dependancy via
npm install @svg-zentrale/eslint-plugin --save-devor
yarn add @svg-zentrale/eslint-plugin --devNext 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"