Skip to content

Commit 23cd7d2

Browse files
committed
[ci] Create basic CI + Fix ESLint issues
1 parent 5932df0 commit 23cd7d2

File tree

4 files changed

+39
-3
lines changed

4 files changed

+39
-3
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build & Test
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
lint-and-typecheck:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
14+
- name: Setup Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: 'lts/*'
18+
cache: 'npm'
19+
20+
- name: Install dependencies
21+
run: npm ci
22+
23+
- name: Can Build
24+
run: npm run build
25+
26+
- name: Generate Codes
27+
run: npm run generate
28+
29+
- name: Run typecheck
30+
run: npm run typecheck
31+
32+
- name: Run lint
33+
run: npm run lint

eslint.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export default tseslint.config(
2020
'packages/saas-kit/generated/**/*',
2121
'packages/saas-kit/.next/**/*',
2222
'packages/saas-kit/src/components/ai-elements/**/*',
23+
'packages/saas-kit/next-env.d.ts',
2324
],
2425
},
2526
// React settings for auto-detection
@@ -45,7 +46,7 @@ export default tseslint.config(
4546
},
4647
settings: {
4748
next: {
48-
rootDir: 'examples/nextjs-app/',
49+
rootDir: 'packages/saas-kit/',
4950
},
5051
},
5152
},

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"lint:fix": "eslint . --ext .ts,.tsx,.js,.jsx --fix",
1919
"clean": "npm run clean --workspaces",
2020
"release": "npm run build && npx changeset publish",
21-
"prepare": "husky"
21+
"prepare": "husky",
22+
"generate": "npm run prisma:generate --workspace=@freemius/saas-kit"
2223
},
2324
"repository": {
2425
"type": "git",

packages/saas-kit/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"prepublish": "npm run build",
1313
"clean": "rm -rf public/r/",
1414
"test": "echo \"No tests yet\"",
15-
"truncate-db": "tsx truncate-tables.ts"
15+
"truncate-db": "tsx truncate-tables.ts",
16+
"prisma:generate": "prisma generate"
1617
},
1718
"dependencies": {
1819
"@ai-sdk/react": "^2.0.9",

0 commit comments

Comments
 (0)