change "lint" to pre-commit and add format

This commit is contained in:
Paul Miller
2023-09-06 11:10:06 -07:00
committed by Tony Giorgio
parent fdf879f123
commit 878196a71e
2 changed files with 5 additions and 1 deletions

View File

@@ -31,6 +31,10 @@ just test-ui
Hopefully your editor picks up on the `.prettirrc` file and auto formats accordingly. If you want to format everything in the project run `pnpm run format`.
## Contributing
Before committing make sure to run `pnpm run pre-commit`. This will typecheck, lint, and format everything so CI won't hassle you.
### Local
If you want to develop against a local version of [the node manager](https://github.com/MutinyWallet/mutiny-node), you may want to `pnpm link` it.

View File

@@ -11,7 +11,7 @@
"start": "solid-start start",
"check-types": "tsc --noemit",
"eslint": "eslint src",
"lint": "pnpm run eslint && pnpm run check-types",
"pre-commit": "pnpm run eslint && pnpm run check-types && pnpm run format",
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css,scss,md}\"",
"check-format": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json,css,scss,md}\""
},