1.0.0 • Published 2 years ago
eslint-plugin-jr v1.0.0
eslint-plugin-jr
eslint-plugin-jr
Installation
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-jr
:
$ npm install eslint-plugin-jr --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-jr
globally.
Usage
Add jr
to the plugins
section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"jr"
]
}
Then configure the rules you want to use under the extends
section, there are six rule groups in total:
{
"extends": [
"plugin:jr/es-dev"
]
}
{
"extends": [
"plugin:jr/es-prod"
]
}
{
"extends": [
"plugin:jr/ts-dev"
]
}
{
"extends": [
"plugin:jr/ts-prod"
]
}
{
"extends": [
"plugin:jr/react-dev"
]
}
{
"extends": [
"plugin:jr/react-prod"
]
}
You can also use list of rules together, configs below means your project use Typescript
+ React
in prod
env:
{
"plugins": [
"jr"
],
"extends": [
"plugin:jr/ts-prod",
"plugin:jr/react-prod"
]
}
1.0.0
2 years ago