8000 Add style:check to ci workflow · avdim/github-script@58f0ff8 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 58f0ff8

Browse files
committed
Add style:check to ci workflow
1 parent 3037861 commit 58f0ff8

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ jobs:
1515
key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}}
1616
restore-keys: ${{runner.os}}-npm-
1717
- run: npm ci
18+
- run: npm run style:check
1819
- run: npm test

docs/development.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ bash> npm run build
1515

1616
It also has a pre-commit hook configured via
1717
[husky](https://www.npmjs.com/package/husky) that should run the build script
18-
before each commit.
18+
before each commit. Additionally, this hook formats code and lints it, as
19+
well.
1920

2021
## Releasing
2122

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
"private": true,
99
"scripts": {
1010
"build": "ncc build src/main.ts",
11-
"format": "prettier --write src __test__",
11+
"format:check": "prettier --check src __test__",
12+
"format:write": "prettier --write src __test__",
1213
"lint": "eslint src __test__",
13-
"check": "run-p --continue-on-error --aggregate-output format lint",
14-
"pre-commit": "run-s check test build",
14+
"style:check": "run-p --continue-on-error --aggregate-output format:check lint",
15+
"style:write": "run-p --continue-on-error --aggregate-output format:write lint",
16+
"pre-commit": "run-s style:write test build",
1517
"test": "jest"
1618
},
1719
"husky": {

0 commit comments

Comments
 (0)
0