0.1.0-beta.2 • Published 2 years ago

@feature-sliced/eslint-plugin-messages v0.1.0-beta.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@feature-sliced/eslint-plugin-messages

WIP: At the moment at beta-testing - use carefully

Custom messages processing for @feature-sliced/eslint-config

  • Methodology specific messages
  • Only important details
  • With documentation references

Get Started

  1. You'll first need to setup @feature-sliced/eslint-config

  2. Next, install @feature-sliced/eslint-plugin-messages

    $ npm install -D @feature-sliced/eslint-plugin-messages
    # or by yarn
    $ yarn add -D @feature-sliced/eslint-plugin-messages
  3. Add config to the plugins and processor sections of your .eslintrc configuration file:

    {
        "plugins": [
            ...
            "@feature-sliced/eslint-plugin-messages"
        ],
        "processor": "@feature-sliced/messages/fs",
    }
  4. See upgraded messages 🍰

    // Before
    > '"widgets" is not allowed to import "widgets" | See rules: https://feature-sliced.design/docs/reference/layers/overview'
    > 'Reaching to "features/search/ui" is not allowed.'
    > 'entities/auth/model` import should occur before import of `shared/config'
    // After
    > 'Violated isolation between layers or slices: "widgets" => "widgets" | https://git.io/Jymh2'
    > 'Violated usage of modules Public API | https://git.io/Jymjf'
    > 'Broken order of imports | https://git.io/JymjI'

FAQ

Why processor as plugin?

Because of ESlint restrictions