Custom lint rules for grailed
Rule | Description | Recommended | Fixable |
---|---|---|---|
jsx-no-ampersands | Enforces ternary returns for jsx ampersands returns | ✔️ | ✖️ |
- Installation
npm install --save -D ~/path/to/parent/eslint-plugin-grailed
or add the following to your package.json
and run npm install
"devDependencies": {
"eslint-plugin-grailed": "file:~/path/to/parent/eslint-plugin-grailed"
}
- Modify
.eslintrc
in your project directory to include one of our rules
{
"plugins": [
"grailed"
],
"rules": {
"grailed/jsx-no-ampersands": "warn"
}
}
All tests live in tests/lib/rules
. Run this command to test all lint rules:
npm test