0.0.4 • Published 9 months ago
eslint-plugin-lf-styleguide v0.0.4
eslint-plugin-lf-styleguide
It is a style guide for frontend codebase at leapfinance
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-lf-styleguide
:
npm install eslint-plugin-lf-styleguide --save-dev
Usage
Add lf-styleguide
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"lf-styleguide"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"lf-styleguide/rule-name": 2
}
}
Configurations
TODO: Run eslint-doc-generator to generate the configs list (or delete this section if no configs are offered).
Rules
🔧 Automatically fixable by the --fix
CLI option.\
💡 Manually fixable by editor suggestions.
Name | Description | 🔧 | 💡 |
---|---|---|---|
no-excessive-or-statements | Disallow excessive or statements more than 3 in a if block | ||
no-local-storage | Avoid using localStorage instead use in build localStorage wrapper named GBLocalStorage | 🔧 | 💡 |