1.0.1 • Published 4 years ago

eslint-plugin-jun v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

eslint-plugin-jun

eslint-plugin-jun

Installation

You'll first need to install ESLint:

$ npm i eslint -D

Next, install eslint-plugin-jun:

$ npm i eslint-plugin-jun -D

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

Usage

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

{
  "plugins": [
    "jun"
  ]
}

Then configure the rules you want to use under the extends section, there are six rule groups in total:

{
  "extends": [
    "plugin:jun/es-dev"
  ]
}
{
  "extends": [
    "plugin:jun/es-prod"
  ]
}
{
  "extends": [
    "plugin:jun/ts-dev"
  ]
}
{
  "extends": [
    "plugin:jun/ts-prod"
  ]
}
{
  "extends": [
    "plugin:jun/react-dev"
  ]
}
{
  "extends": [
    "plugin:jun/react-prod"
  ]
}

You can also use list of rules together, configs below means your project use Typescript + React in prod env:

{
  "plugins": [
    "jun"
  ],
  "extends": [
    "plugin:jun/ts-prod",
    "plugin:jun/react-prod"
  ]
}