Skip to content

Commit 33eb8d6

Browse files
committed
add:ci format
1 parent 0cacf06 commit 33eb8d6

File tree

4 files changed

+52
-19
lines changed

4 files changed

+52
-19
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,11 @@ jobs:
2525
npm install
2626
npm ci
2727
- name: Test
28-
run: npm run test -- --coverage
28+
run: npm run test -- --coverage
29+
style:
30+
name: Style
31+
runs-on: ubuntu-latest
32+
33+
steps:
34+
- name: Check Format
35+
run: npm run format:check

package-lock.json

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
"build": "npx tsc",
1111
"start": "node dist/main.js",
1212
"dev": "npx tsc && node dist/main.js",
13-
"test": "vitest --run"
13+
"test": "vitest --run",
14+
"format:write": "prettier --write \"src/**/*.{js,ts,json,css,md}\"",
15+
"format:check": "prettier --check \"src/**/*.{js,ts,json,css,md}\""
1416
},
1517
"devDependencies": {
1618
"@types/cors": "^2.8.17",
@@ -19,6 +21,7 @@
1921
"@vitest/coverage-v8": "^3.2.4",
2022
"drizzle-kit": "^0.28.1",
2123
"globals": "^15.12.0",
24+
"prettier": "3.6.2",
2225
"tsx": "^4.19.2",
2326
"typescript": "^5.6.3",
2427
"vitest": "^3.2.4"
@@ -38,4 +41,4 @@
3841
"semi": true,
3942
"singleQuote": false
4043
}
41-
}
44+
}

src/api/auth.test.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import { describe, expect, test } from "vitest";
2-
3-
const person = {
4-
isActive: true,
5-
age: 32,
6-
};
7-
8-
describe("person", () => {
9-
test("person is defined", () => {
10-
expect(person).toBeDefined();
11-
});
12-
13-
test("is active", () => {
14-
expect(person.isActive).toBeTruthy();
15-
});
16-
});
1+
import { describe, expect, test } from "vitest";
2+
3+
const person = {
4+
isActive: true,
5+
age: 32,
6+
};
7+
8+
describe("person", () => {
9+
test("person is defined", () => {
10+
expect(person).toBeDefined();
11+
});
12+
13+
test("is active", () => {
14+
expect(person.isActive).toBeTruthy();
15+
});
16+
});

0 commit comments

Comments
 (0)