From 648ffc351aa49d8d512b9fb606dcee483ed0142e Mon Sep 17 00:00:00 2001 From: Alessio Koci Date: Sat, 26 Oct 2024 19:43:19 +0200 Subject: [PATCH] chore: biome ci --- .github/workflows/pull-request.yml | 18 ++++++++++++++++++ apps/examples/vite.config.js | 10 +++++----- biome.json | 6 +++++- docs/CONTRIBUTE.md | 6 +++--- package.json | 4 ++-- 5 files changed, 33 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/pull-request.yml diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..461742b --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,18 @@ +name: Code quality + +on: + push: + pull_request: + +jobs: + quality: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Biome + uses: biomejs/setup-biome@v2 + with: + version: latest + - name: Run Biome + run: biome ci . diff --git a/apps/examples/vite.config.js b/apps/examples/vite.config.js index f3be2a1..d6f0b0a 100644 --- a/apps/examples/vite.config.js +++ b/apps/examples/vite.config.js @@ -1,10 +1,10 @@ -import { defineConfig } from "vite"; -import react from "@vitejs/plugin-react"; +import react from '@vitejs/plugin-react' +import { defineConfig } from 'vite' export default defineConfig({ plugins: [react()], - root: "src", + root: 'src', build: { - outDir: "../dist", + outDir: '../dist', }, -}); +}) diff --git a/biome.json b/biome.json index 666c0b5..cd6e1b5 100644 --- a/biome.json +++ b/biome.json @@ -1,7 +1,11 @@ { "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", "vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false }, - "files": { "ignoreUnknown": false, "ignore": [] }, + "files": { + "ignoreUnknown": false, + "ignore": [], + "include": ["packages/**/*", "apps/**/*"] + }, "formatter": { "enabled": true, "useEditorconfig": true, diff --git a/docs/CONTRIBUTE.md b/docs/CONTRIBUTE.md index ec18e54..2027e20 100644 --- a/docs/CONTRIBUTE.md +++ b/docs/CONTRIBUTE.md @@ -13,9 +13,9 @@ ## Run `examples` Steps -- open the `packages/useWorker` directory -- run `pnpm run start` +- open the `apps/examples` directory +- run `pnpm run dev` ## How to debug -- the `packages/examples` project is linked to the `packages/useWorker` build so you can test your changes immediately +- the `apps/examples` project is linked to the `packages/useWorker` build so you can test your changes immediately diff --git a/package.json b/package.json index 24e1b7c..0f6e408 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "scripts": { "preinstall": "npx only-allow pnpm", "changeset": "changeset", - "check": "biome check --write packages/**/*", - "check:fix": "biome check --write packages/**/*", + "check": "biome check", + "check:fix": "biome check --write", "ci:build": "pnpm run build -r", "ci:publish": "pnpm run build -r && changeset publish", "ci:version": "changeset version"