Skip to content

Commit

Permalink
add ci check, lint and types
Browse files Browse the repository at this point in the history
  • Loading branch information
atilafassina committed Sep 27, 2024
1 parent 40fbe0a commit 98129ef
Show file tree
Hide file tree
Showing 6 changed files with 382 additions and 131 deletions.
32 changes: 0 additions & 32 deletions .eslintrc.cjs

This file was deleted.

33 changes: 33 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"ignorePatterns": ["node_modules/", "dist/"],
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:solid/typescript"
],
"overrides": [
{
"env": {
"node": true
},
"files": [".eslintrc.{js,cjs}"],
"parserOptions": {
"sourceType": "script"
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "solid"],
"rules": {
"quotes": ["error", "double"],
"semi": "warn"
}
}
34 changes: 34 additions & 0 deletions .github/workflows/static_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 🔍 Lint / Type Checks

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"

- name: Install dependencies
run: pnpm i

- name: TypeScript check
run: pnpm check:types

- name: ESLint check
run: pnpm check:lint
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"start": "vinxi start",
"e2e": "npx playwright test",
"build:lunaria": "lunaria build",
"preview:lunaria": "lunaria preview"
"preview:lunaria": "lunaria preview",
"check:lint": "eslint .",
"check:types": "tsc --noEmit"
},
"dependencies": {
"@kobalte/core": "^0.13.6",
Expand Down Expand Up @@ -47,17 +49,18 @@
"@orama/crawly": "^0.0.4",
"@tailwindcss/typography": "^0.5.15",
"@types/node": "^20.16.5",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.7.0",
"@typescript-eslint/parser": "^8.7.0",
"autoprefixer": "^10.4.20",
"eslint": "^8.57.0",
"eslint": "^8.57.1",
"eslint-plugin-solid": "^0.13.2",
"prettier": "3.2.5",
"rehype-raw": "^7.0.0",
"remark-expressive-code": "^0.33.5",
"remark-frontmatter": "^5.0.0",
"remark-gfm": "^3.0.0",
"tailwindcss": "^3.4.11"
"tailwindcss": "^3.4.11",
"typescript": "^5.6.2"
},
"engines": {
"node": ">=18",
Expand Down
Loading

0 comments on commit 98129ef

Please sign in to comment.