Package Exports
- @svg-zentrale/eslint-plugin
- @svg-zentrale/eslint-plugin/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@svg-zentrale/eslint-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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"