normandy/lints
Mike Cooper d8274cd159
Update flake8 for better Python 3.6 compatibility
2017-02-16 13:25:02 -08:00
..
bin Temporarily disable nsp because it is failing builds. 2017-02-16 12:16:13 -08:00
requirements Update flake8 for better Python 3.6 compatibility 2017-02-16 13:25:02 -08:00
Dockerfile lints: Install git in Docker image 2017-02-06 16:36:29 -08:00
README.md Fix typos in READMEs 2017-01-06 15:42:42 -08:00
package.json #500: Add NSP to lint command in CI. 2017-02-15 00:43:40 -08:00

README.md

Lints

This is a unified linting tool for all Normandy projects.

Usage

The lints are run in a Docker container which sets up all tools needed. To provide the code to lint, mount it as a Docker volume at /app/code. The default command for the Dockerfile is the lint tool.

$ docker build -t lint  .
$ docker run -v $CODE_TO_LINT:/app/code lint

The directory mounted must be a git repo, as git information is used to find files to lint. It must contain a .therapist.yml config file.

Implementation

All lints are run and managed through Therapist. The lints currently run are:

  • flake8 - For Python files
  • eslint - for JS and JSX files. Local .eslintrc files are respected.
  • stylelint - For CSS and SCSS files. Local .stylelint files are respected.