eslint-config-figo
v2.0.0
Published
Shareable ESLint config for figo ecosystem
Downloads
10
Maintainers
Readme
eslint-config-figo
Shareable ESLint configuration module for figo ecosystem.
This package provides Figo teams base JS .eslintrc.js
as an extensible shared config. Based on Airbnb's base config
Usage
Our default export contains all of our ESLint rules, including ECMAScript 6.
- add
eslint-config-figo
to your dev dependenciesnpm i --save-dev eslint-config-figo
- extend it in your
.eslintrc.js
file fully:
or partially:{ "extends": "figo", "root": true }
Please note,{ "extends": "figo/test" }
.eslintrc
configuration file format is deprecated.
See Airbnb's overarching ESLint config, Airbnb's Javascript styleguide, and the ESlint config docs for more information.
Running
You can simply run it with $(npm bin)/eslint {file|folder to validate}
Or add it to your package.json
script section
"scripts": {
"lint": "$(npm bin)/eslint ./app/"
}
and then run npm run lint
Precommit validation
In case if you need to do linting on pre-commit git hook, it possible to use provided figo-lint
helper to lint staged files.
Example of npm script:
"scripts": {
"precommit": "$(npm bin)/figo-lint"
}