Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add pre-commit config and installation notes #22

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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`.
Loading