eslint-plugin-plm
v0.1.6
Published
Custom eslint rules for PatientsLikeMe js projects
Downloads
1,548
Readme
eslint-plugin-plm
PLM eslint rules
A set of eslint rules for plm javascript projects.
Installation
This project uses yarn, but any
yarn
commands can be replaced with npm
.
Dev install
git clone [email protected]:patientslikeme/eslint-plugin-plm.git
cd eslint-plugin-plm
yarn install
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-plm
globally.
Usage
Run npm install --save-dev eslint-plugin-plm
in your js project.
Add plm
to the plugins section of your .eslintrc
configuration file.
You can omit the eslint-plugin-
prefix:
{
"plugins": [
"plm"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"plm/rule-name": 2
}
}
Supported Rules
Adding a Rule
This project uses yeoman. To add a new rule:
yarn generate:rule
Make sure all tests are passing: yarn run test
.
For more details on writing rules, see this post and the official docs.
Copy and paste the tests cases for your rule into AST explorer to make life easier.