Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
repos:
- repo: local
hooks:
- id: npm-lint
name: npm lint
entry: sh -c 'npm run lint'
language: system
types: [file]
files: src/.*\.(cjs|js|ts|tsx|json|css|md|yml)$
pass_filenames: false
- id: npm-format
name: npm run format
entry: sh -c 'npm run format'
language: system
types: [file]
files: src/.*\.(cjs|js|ts|tsx|json|css|md|yml)$
pass_filenames: false
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ Install with `npm install`
Run the dev server with `npm run dev`

See [scene.tsx](https://github.com/aganders3/points-web-viewer/blob/a66ff6aa7ff3cdf1259cf4090ac388ac59d85991/src/scene.tsx) for an example component displaying a three.js scene.

To run linting and formatting run `npm run lint` and `npm run format`.
To automate these as git pre-commit hooks run `pip install pre-commit && pre-commit install`.