Add style:check to ci workflow

This commit is contained in:
Jonathan Clem 2020-05-18 11:33:04 -04:00
parent 3037861304
commit 58f0ff84d6
No known key found for this signature in database
GPG key ID: B3662C4A8F843179
3 changed files with 8 additions and 4 deletions

View file

@ -15,4 +15,5 @@ jobs:
key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}}
restore-keys: ${{runner.os}}-npm-
- run: npm ci
- run: npm run style:check
- run: npm test

View file

@ -15,7 +15,8 @@ bash> npm run build
It also has a pre-commit hook configured via
[husky](https://www.npmjs.com/package/husky) that should run the build script
before each commit.
before each commit. Additionally, this hook formats code and lints it, as
well.
## Releasing

View file

@ -8,10 +8,12 @@
"private": true,
"scripts": {
"build": "ncc build src/main.ts",
"format": "prettier --write src __test__",
"format:check": "prettier --check src __test__",
"format:write": "prettier --write src __test__",
"lint": "eslint src __test__",
"check": "run-p --continue-on-error --aggregate-output format lint",
"pre-commit": "run-s check test build",
"style:check": "run-p --continue-on-error --aggregate-output format:check lint",
"style:write": "run-p --continue-on-error --aggregate-output format:write lint",
"pre-commit": "run-s style:write test build",
"test": "jest"
},
"husky": {