eslint-plugin-minxing

A group of ESLint plugin and presets for the minxing company.

Usage no npm install needed!

<script type="module">
  import eslintPluginMinxing from 'https://cdn.skypack.dev/eslint-plugin-minxing';
</script>

README

eslint-plugin-minxing

A group of ESLint plugin and presets for the minxing company.

Setup

  1. Global tools
    1. npm install -g yo
    2. npm install -g generator-eslint
  2. Generate the eslint-plugin skeleton
    1. yo eslint:plugin
  3. Generate the eslint-rules skeleton
    1. yo eslint:rule

References

  1. https://medium.com/@btegelund/creating-an-eslint-plugin-87f1cb42767f
  2. https://www.kenneth-truyers.net/2016/05/27/writing-custom-eslint-rules/

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-minxing:

$ npm install eslint-plugin-minxing --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eeslint-plugin-minxing globally.

Usage

Add minxing to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "minxing"
    ]
}

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

{
  "rules": {
    "minxing/arrow-parens": ["error", "as-needed"],
    "minxing/generator-star-spacing": ["error", "before"],
    "minxing/no-array-concat": ["error"],
    "minxing/no-string-charcode": ["error"],
    "minxing/no-util-format": ["error"],
    "minxing/require-yield": 2,
    "minxing/no-console": 2
  }
}

Supported Rules

  • Fill in provided rules here