JSPM

@svg-zentrale/eslint-plugin

0.2.4
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 118
    • Score
      100M100P100Q68788F
    • License MIT

    SVG ESLint rules

    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 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"