Skip to content
This repository was archived by the owner on Apr 4, 2026. It is now read-only.

Commit cfeacc3

Browse files
committed
feat(root): prettier
1 parent 83a05ca commit cfeacc3

17 files changed

Lines changed: 201 additions & 138 deletions

.github/workflows/lint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Lint
2+
on:
3+
push:
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-22.04
8+
strategy:
9+
matrix:
10+
node-version: [22]
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Install pnpm
14+
uses: pnpm/action-setup@v4
15+
with:
16+
version: 10
17+
- name: Use Node.js ${{ matrix.node-version }}
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
cache: "pnpm"
22+
- name: Install dependencies
23+
run: pnpm install
24+
- name: Run code formatting check
25+
run: pnpm exec prettier . --check

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm-lock.yaml

.vscode/tasks.json

Lines changed: 60 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,63 @@
11
{
2-
"version": "2.0.0",
3-
"tasks": [
4-
{
5-
"label": "nodemon",
6-
"type": "shell",
7-
"command": "nodemon",
8-
"group": "build",
9-
"presentation": {
10-
"echo": true,
11-
"reveal": "always",
12-
"focus": false,
13-
"panel": "new"
14-
},
15-
"options": {
16-
"cwd": "${workspaceFolder}/apps/api"
17-
},
18-
"problemMatcher": {
19-
"owner": "nodemon",
20-
"fileLocation": [
21-
"relative",
22-
"${workspaceFolder}/apps/api"
23-
],
24-
"pattern": {
25-
"regexp": "^(.*):(\\d+):(\\d+)\\s+-\\s+(error|warning|info)\\s+(.*)$",
26-
"file": 1,
27-
"line": 2,
28-
"column": 3,
29-
"severity": 4,
30-
"message": 5
31-
},
32-
"background": {
33-
"activeOnStart": true,
34-
"beginsPattern": "^\\[nodemon\\] starting",
35-
"endsPattern": "^\\[nodemon\\] (clean exit|app crashed)"
36-
}
37-
},
38-
"isBackground": true
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "nodemon",
6+
"type": "shell",
7+
"command": "nodemon",
8+
"group": "build",
9+
"presentation": {
10+
"echo": true,
11+
"reveal": "always",
12+
"focus": false,
13+
"panel": "new"
14+
},
15+
"options": {
16+
"cwd": "${workspaceFolder}/apps/api"
17+
},
18+
"problemMatcher": {
19+
"owner": "nodemon",
20+
"fileLocation": ["relative", "${workspaceFolder}/apps/api"],
21+
"pattern": {
22+
"regexp": "^(.*):(\\d+):(\\d+)\\s+-\\s+(error|warning|info)\\s+(.*)$",
23+
"file": 1,
24+
"line": 2,
25+
"column": 3,
26+
"severity": 4,
27+
"message": 5
3928
},
40-
{
41-
"label": "TypeScript Watch",
42-
"type": "shell",
43-
"command": "tsc",
44-
"args": [
45-
"--noEmit",
46-
"--watch"
47-
],
48-
"group": "build",
49-
"presentation": {
50-
"echo": true,
51-
"reveal": "always",
52-
"focus": false,
53-
"panel": "new"
54-
},
55-
"options": {
56-
"cwd": "${workspaceFolder}/apps/api"
57-
},
58-
"problemMatcher": "$tsc-watch",
59-
"isBackground": true
60-
},
61-
{
62-
"label": "API Development",
63-
"dependsOn": [
64-
"nodemon",
65-
"TypeScript Watch"
66-
],
67-
"dependsOrder": "parallel",
68-
"group": "build",
69-
"problemMatcher": []
29+
"background": {
30+
"activeOnStart": true,
31+
"beginsPattern": "^\\[nodemon\\] starting",
32+
"endsPattern": "^\\[nodemon\\] (clean exit|app crashed)"
7033
}
71-
]
72-
}
34+
},
35+
"isBackground": true
36+
},
37+
{
38+
"label": "TypeScript Watch",
39+
"type": "shell",
40+
"command": "tsc",
41+
"args": ["--noEmit", "--watch"],
42+
"group": "build",
43+
"presentation": {
44+
"echo": true,
45+
"reveal": "always",
46+
"focus": false,
47+
"panel": "new"
48+
},
49+
"options": {
50+
"cwd": "${workspaceFolder}/apps/api"
51+
},
52+
"problemMatcher": "$tsc-watch",
53+
"isBackground": true
54+
},
55+
{
56+
"label": "API Development",
57+
"dependsOn": ["nodemon", "TypeScript Watch"],
58+
"dependsOrder": "parallel",
59+
"group": "build",
60+
"problemMatcher": []
61+
}
62+
]
63+
}

apps/api/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
interface Env {
2-
HOST: string;
3-
PORT: number;
2+
HOST: string
3+
PORT: number
44
}

apps/api/nodemon.json

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
11
{
2-
"restartable": "rs",
3-
"ignore": [
4-
".git",
5-
"node_modules/**/node_modules"
6-
],
7-
"verbose": true,
8-
"execMap": {
9-
"ts": "tsx"
10-
},
11-
"events": {
12-
"restart": "osascript -e 'display notification \"App restarted due to:\n'$FILENAME'\" with title \"nodemon\"'"
13-
},
14-
"watch": [
15-
"src/**/*.ts"
16-
],
17-
"env": {
18-
"NODE_ENV": "development"
19-
},
20-
"ext": "ts,json",
21-
"exec": "tsx src/index.ts"
22-
}
2+
"restartable": "rs",
3+
"ignore": [".git", "node_modules/**/node_modules"],
4+
"verbose": true,
5+
"execMap": {
6+
"ts": "tsx"
7+
},
8+
"events": {
9+
"restart": "osascript -e 'display notification \"App restarted due to:\n'$FILENAME'\" with title \"nodemon\"'"
10+
},
11+
"watch": ["src/**/*.ts"],
12+
"env": {
13+
"NODE_ENV": "development"
14+
},
15+
"ext": "ts,json",
16+
"exec": "tsx src/index.ts"
17+
}

apps/api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@
2424
"tsx": "~4.20.6",
2525
"typescript": "~5.9.2"
2626
}
27-
}
27+
}

apps/api/src/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import express from 'express';
1+
import express from "express"
22

3-
const app = express();
3+
const app = express()
44

5-
app.get('/', (req, res) => {
6-
res.json({ test: 'hello world' });
7-
});
5+
app.get("/", (req, res) => {
6+
res.json({ test: "hello world" })
7+
})
88

99
app.listen(3000, () => {
10-
console.log('Listening on port 3000');
11-
});
10+
console.log("Listening on port 3000")
11+
})

apps/api/tsconfig.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
// See also https://aka.ms/tsconfig/module
1010
"module": "nodenext",
1111
"target": "esnext",
12-
"types": [
13-
"node",
14-
"./index.d.ts"
15-
],
12+
"types": ["node", "./index.d.ts"],
1613
// For nodejs:
1714
// "lib": ["esnext"],
1815
// "types": ["node"],
@@ -42,7 +39,7 @@
4239
"isolatedModules": true,
4340
"noUncheckedSideEffectImports": true,
4441
"moduleDetection": "force",
45-
"skipLibCheck": true,
42+
"skipLibCheck": true
4643
},
4744
"include": ["src/**/*.ts"]
4845
}

apps/dashboard/astro.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// @ts-check
2-
import { defineConfig } from 'astro/config';
2+
import { defineConfig } from "astro/config"
33

44
// https://astro.build/config
5-
export default defineConfig({});
5+
export default defineConfig({})

apps/dashboard/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,9 @@
1212
},
1313
"dependencies": {
1414
"astro": "~5.14.1"
15+
},
16+
"devDependencies": {
17+
"prettier": "~3.6.2",
18+
"prettier-plugin-astro": "0.14.1"
1519
}
16-
}
20+
}

0 commit comments

Comments
 (0)