Shareable ESLint configuration module for figo ecosystem.
Moved to figo-platform/eslint-config
This package provides Figo teams base JS .eslintrc.js
as an extensible shared config. Based on Airbnb's base config
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.
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
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"
}