Skip to content

Commit 7f35ae2

Browse files
committed
add ci check, lint and types
1 parent 40fbe0a commit 7f35ae2

File tree

6 files changed

+382
-131
lines changed

6 files changed

+382
-131
lines changed

.eslintrc.cjs

-32
This file was deleted.

.eslintrc.json

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"ignorePatterns": ["node_modules/", "dist/"],
3+
"env": {
4+
"browser": true,
5+
"es2021": true
6+
},
7+
"extends": [
8+
"eslint:recommended",
9+
"plugin:@typescript-eslint/recommended",
10+
"plugin:solid/typescript"
11+
],
12+
"overrides": [
13+
{
14+
"env": {
15+
"node": true
16+
},
17+
"files": [".eslintrc.{js,cjs}"],
18+
"parserOptions": {
19+
"sourceType": "script"
20+
}
21+
}
22+
],
23+
"parser": "@typescript-eslint/parser",
24+
"parserOptions": {
25+
"ecmaVersion": "latest",
26+
"sourceType": "module"
27+
},
28+
"plugins": ["@typescript-eslint", "solid"],
29+
"rules": {
30+
"quotes": ["error", "double"],
31+
"semi": "warn"
32+
}
33+
}

.github/workflows/static_checks.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: 🔍 Lint / Type Checks
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Install pnpm
17+
uses: pnpm/action-setup@v4
18+
with:
19+
version: 9
20+
21+
- name: Use Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: "20"
25+
cache: "pnpm"
26+
27+
- name: Install dependencies
28+
run: pnpm i
29+
30+
- name: TypeScript check
31+
run: pnpm check:types
32+
33+
- name: ESLint check
34+
run: pnpm check:lint

package.json

+8-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
"start": "vinxi start",
1414
"e2e": "npx playwright test",
1515
"build:lunaria": "lunaria build",
16-
"preview:lunaria": "lunaria preview"
16+
"preview:lunaria": "lunaria preview",
17+
"check:lint": "eslint .",
18+
"check:types": "tsc --noEmit"
1719
},
1820
"dependencies": {
1921
"@kobalte/core": "^0.13.6",
@@ -47,17 +49,18 @@
4749
"@orama/crawly": "^0.0.4",
4850
"@tailwindcss/typography": "^0.5.15",
4951
"@types/node": "^20.16.5",
50-
"@typescript-eslint/eslint-plugin": "^7.18.0",
51-
"@typescript-eslint/parser": "^7.18.0",
52+
"@typescript-eslint/eslint-plugin": "^8.7.0",
53+
"@typescript-eslint/parser": "^8.7.0",
5254
"autoprefixer": "^10.4.20",
53-
"eslint": "^8.57.0",
55+
"eslint": "^8.57.1",
5456
"eslint-plugin-solid": "^0.13.2",
5557
"prettier": "3.2.5",
5658
"rehype-raw": "^7.0.0",
5759
"remark-expressive-code": "^0.33.5",
5860
"remark-frontmatter": "^5.0.0",
5961
"remark-gfm": "^3.0.0",
60-
"tailwindcss": "^3.4.11"
62+
"tailwindcss": "^3.4.11",
63+
"typescript": "^5.6.2"
6164
},
6265
"engines": {
6366
"node": ">=18",

0 commit comments

Comments
 (0)