Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
docs(readme): Add example for environment variables (#564)
  • Loading branch information
loklaan authored and okonet committed Jan 11, 2019
1 parent 73e04d7 commit adfc1d4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Expand Up @@ -268,6 +268,18 @@ The following is equivalent:
}
```

### Use environment variables with linting commands

Linting commands _do not_ support the shell convention of expanding environment variables. To enable the convention yourself, use a tool like [`cross-env`](https://github.com/kentcdodds/cross-env).

For example, here is `jest` running on all `.js` files with the `NODE_ENV` variable being set to `"test"`:

```json
{
"*.js": ["cross-env NODE_ENV=test jest --bail --findRelatedTests"]
}
```

### Automatically fix code style with `prettier` for javascript + flow, typescript, markdown or html

```json
Expand Down

0 comments on commit adfc1d4

Please sign in to comment.