Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 959 Bytes

README.md

File metadata and controls

30 lines (20 loc) · 959 Bytes

lint-trap

This package provides Virtru's .eslintrc as an extensible shared config.

Usage

  1. npm install --save-dev virtru/lint-trap
  2. 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.

Environment Variables

There are two environment variables that you can set to determine what rules are ran.

REPO_ENVIRONMENT

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.

REPO_TYPE

Either 'frontend' or 'backend'. The default is 'frontend'. Currently only is used when REPO_ENVIRONMENT is set to 'ci'