Skip to content

Commit

Permalink
chore: lint staged files before commit
Browse files Browse the repository at this point in the history
  • Loading branch information
InvictusMB authored and raymondfeng committed Jul 7, 2020
1 parent 4bf77c8 commit 2de520c
Show file tree
Hide file tree
Showing 4 changed files with 574 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"*.{ts,js}": [
"node packages/build/bin/run-prettier --write",
"node packages/build/bin/run-eslint --fix --report-unused-disable-directives --cache"
],
"*.{md}": [
"node packages/build/bin/run-prettier --write"
]
}
3 changes: 3 additions & 0 deletions docs/site/DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ npm script `lint:fix`.
npm run lint:fix
```

Files staged for commit are linted automatically. If necessary, pre-commit
linting can be bypassed by setting the environment variable `LINT_STAGED=0`.

## Working with dependencies

We use npm's
Expand Down
Loading

0 comments on commit 2de520c

Please sign in to comment.