This package provides an extensible shared ESLint config, intended to promote consistent code style among applications built with FOLIO Stripes.
If you haven't already installed ESLint as a dev dependency in your project, it's a required peer of eslint-config-stripes
:
yarn add eslint -D
Then add eslint-config-stripes
to your devDependencies
:
yarn add eslint-config-stripes -D
Create .eslintrc
in the root of your project. Its contents:
{
"extends": "stripes"
}
If you're extensively using newer JavaScript syntax with Babel, you may want to use babel-eslint
in your FOLIO project.
yarn add babel-eslint -D
In .eslintrc
, specify your parser:
{
"extends": "stripes",
"parser": "babel-eslint"
}
Run eslint src
in your terminal to lint the files in the src
directory (or modify to wherever the primary source of your project lives).
Add to your package.json
scripts
, so you can simply run yarn lint
:
"lint": "eslint src"
See project STRIPES at the FOLIO issue tracker.
Other FOLIO Developer documentation is at dev.folio.org.