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