0.2.0 • Published 3 years ago

@hxui/eslint-plugin-mfe v0.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

HXUI Eslint Plugin (MFEs)

An eslint plugin for Helix microfrontends.

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install @hxui/eslint-plugin-mfe:

npm install @hxui/eslint-plugin-mfe --save-dev

Usage

Option 1 (Preferred): Add @hxui/mfe to the extends section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "extends": [
    "plugin:@hxui/mfe/recommended", // for typescript files
    "plugin:@hxui/mfe/template" // for html files
  ]
}

Option 2: Add @hxui/mfe to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["@hxui/mfe"]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "@hxui/mfe/specific-rule-name": 2
  }
}

Supported Rules

  • @hxui/mfe/no-routerlink
  • @hxui/mfe/no-router-methods
  • @hxui/mfe/improper-router-import

License

ISC