This package provides Virtru's .eslintrc as an extensible shared config.
WARNING: Do not update eslint-config-airbnb-base
past v3.x
unless you are prepared to resolve a massive number of lint errors across Virtu repos.
npm install --save-dev virtru/lint-trap
- add
"extends": "lint-trap"
to your .eslintrc
See the ESlint config docs for more information.
A basic .eslintrc file will look like this:
{
"extends": "lint-trap"
}
You may need to add repo specific environments and globals, but this is all you need for a brand new repo.
There are two environment variables that you can set to determine what rules are ran.
Either 'dev'
or 'ci'
. The default is 'dev'
. CI rules are for things we don't want to be allowed into a repo, but allow for convenience during development.
Either 'frontend'
or 'backend'
. The default is 'frontend'
. Currently only is used when REPO_ENVIRONMENT
is set to 'ci'