Skip to content

Commit

Permalink
ci: set up linting and github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
betich committed Dec 23, 2024
1 parent 94a231a commit 78e1f45
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install modules
run: bun install --frozen-lockfile
- name: Run ESLint
run: bun run lint
Binary file modified bun.lockb
Binary file not shown.
15 changes: 15 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import eslintPluginAstro from "eslint-plugin-astro"
import js from "@eslint/js"
import tseslint from "typescript-eslint"

export default tseslint.config(
// add more generic rule sets here, such as:
js.configs.recommended,
eslintPluginAstro.configs.recommended,
{
rules: {
// override/add rules settings here, such as:
// "astro/no-set-html-directive": "error"
},
}
)
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,20 @@
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
"format": "prettier --write ."
"format": "prettier --write .",
"lint": "eslint ."
},
"dependencies": {
"astro": "^5.1.1"
},
"devDependencies": {
"@eslint/eslintrc": "^3.2.0",
"@typescript-eslint/eslint-plugin": "^8.18.2",
"@typescript-eslint/parser": "^8.18.2",
"eslint": "^9.17.0",
"eslint-plugin-astro": "^1.3.1",
"prettier": "^3.4.2",
"prettier-plugin-astro": "^0.14.1"
"prettier-plugin-astro": "^0.14.1",
"typescript-eslint": "^8.18.2"
}
}
1 change: 1 addition & 0 deletions src/components/Welcome.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
import astroLogo from "@/assets/astro.svg"
import background from "@/assets/background.svg"
const a = ""
---

<div id="container">
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "astro/tsconfigs/strict",
"include": [".astro/types.d.ts", "**/*", ".prettierrc.mjs"],
"include": [".astro/types.d.ts", "**/*", ".prettierrc.mjs", "eslint.config.js"],
"exclude": ["dist"],
"compilerOptions": {
"paths": {
Expand Down

0 comments on commit 78e1f45

Please sign in to comment.