diff --git a/.github/workflows/PrQuality.yml b/.github/workflows/PrQuality.yml index 563a52d..ea5fc76 100644 --- a/.github/workflows/PrQuality.yml +++ b/.github/workflows/PrQuality.yml @@ -25,31 +25,3 @@ jobs: - name: Check stylelint run: bunx stylelint src/styles/**/*.css - - CommitQuality: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: oven-sh/setup-bun@v1 - with: - bun-version: latest - - - name: Install packages - run: | - bun install || echo "::warning::Warning: Failed to install packages" - - - name: Print versions - run: | - bun --version || echo "::warning::Warning: Failed to print bun version" - bunx commitlint --version || echo "::warning::Warning: Failed to print commitlint version" - - name: Install commitlint - run: | - bun install conventional-changelog-conventionalcommits || echo ::warning::"Warning: Failed to install conventional-changelog-conventionalcommits" - bun install commitlint@latest || echo "::warning::Warning: Failed to install commitlint" - - - name: Validate current commit (last commit) with commitlint - if: github.event_name == 'push' - run: | - bunx commitlint --from HEAD~1 --to HEAD --verbose || echo "::warning::Warning: Commitlint validation failed for the last commit" diff --git a/.github/workflows/Quality.yml b/.github/workflows/Quality.yml index 87a0c43..0c7f46c 100644 --- a/.github/workflows/Quality.yml +++ b/.github/workflows/Quality.yml @@ -23,28 +23,4 @@ jobs: - name: Install Deps run: bun install - name: Check stylelint - run: bunx stylelint src/styles/**/*.css - - CommitQuality: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - uses: oven-sh/setup-bun@v1 - with: - bun-version: latest - - name: Install packages - run: bun install - - - name: Print versions - run: | - bun --version - bunx commitlint --version - - name: Validate current commit (last commit) with commitlint - if: github.event_name == 'push' - run: bunx commitlint --from HEAD~1 --to HEAD --verbose - - name: Validate PR commits with commitlint - if: github.event_name == 'pull_request' - run: bunx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose \ No newline at end of file + run: bunx stylelint src/styles/**/*.css \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0a6d57c..8dcef12 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -39,24 +39,6 @@ jobs: - name: Check stylelint run: bun stylelint - commitquality: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: oven-sh/setup-bun@v1 - with: - bun-version: latest - - - name: Install packages - run: | - bun install - - - name: Validate current commit (last commit) with commitlint - if: github.event_name == 'push' - run: bunx commitlint --from HEAD~1 --to HEAD --verbose - build: needs: [commitquality, quality] runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 1c628af..4884102 100644 --- a/.gitignore +++ b/.gitignore @@ -32,5 +32,3 @@ package-lock.json .direnv .devenv -# Pre-Commit -.pre-commit-config.yaml diff --git a/.husky/commit-msg b/.husky/commit-msg deleted file mode 100755 index 8d4663a..0000000 --- a/.husky/commit-msg +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - -bunx commitlint --edit ${1} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 120000 index 0000000..b3fe610 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1 @@ +/nix/store/dwspqsdpi5qcgsxmg34vn98ama32fwif-pre-commit-config.json \ No newline at end of file diff --git a/package.json b/package.json index 8ba70d5..0215bb6 100644 --- a/package.json +++ b/package.json @@ -1,61 +1,57 @@ { - "name": "teaclient-website", - "type": "module", - "version": "0.0.1", - "scripts": { - "dev": "astro dev", - "preview": "astro preview", - "build": "astro build", - "astro": "astro", - "lint": "biome check --apply . && stylelint 'src/styles/**/*.css' --fix", - "fmt": "biome format . --write", - "biome": "bunx @biomejs/biome", - "check": "biome check . && stylelint 'src/styles/**/*.css'&& bun astro check", - "postinstall": "husky install" - }, - "trustedDependencies": ["sharp"], - "stylelint": { - "extends": "stylelint-config-standard", - "plugins": ["stylelint-scss"], - "customSyntax": "postcss-scss", - "rules": { - "at-rule-no-unknown": null, - "selector-class-pattern": null, - "scss/at-rule-no-unknown": true, - "custom-property-pattern": null - } - }, - "commitlint": { - "extends": ["@commitlint/config-conventional"] - }, - "dependencies": { - "@astrojs/mdx": "^2.0.2", - "@astrojs/rss": "^4.0.5", - "@astrojs/sitemap": "^3.1.1", - "@astrojs/tailwind": "^5.1.0", - "@astrojs/ts-plugin": "^1.3.1", - "astro-meta-tags": "^0.2.1", - "astro-seo": "^0.8.0", - "axios": "^1.6.5", - "sass": "^1.71.1", - "sharp": "^0.33.2", - "tailwind-merge": "^2.2.1", - "tailwindcss": "^3.4.1", - "web-vitals": "^3.5.0" - }, - "devDependencies": { - "@astrojs/check": "^0.5.10", - "@biomejs/biome": "^1.5.3", - "@commitlint/cli": "^18.4.3", - "@commitlint/config-conventional": "^18.4.3", - "@types/node": "^20.8.3", - "astro": "^4.2.3", - "husky": "^9.0.11", - "postcss-scss": "^4.0.9", - "stylelint": "^16.3.1", - "stylelint-config-standard": "^36.0.0", - "stylelint-scss": "^6.2.1", - "typescript": "^5.2.2" - }, - "packageManager": "bun@1.0.25" + "name": "teaclient-website", + "type": "module", + "version": "0.0.1", + "scripts": { + "dev": "astro dev", + "preview": "astro preview", + "build": "astro build", + "astro": "astro", + "lint": "biome check --apply . && stylelint 'src/styles/**/*.css' --fix", + "fmt": "biome format . --write", + "biome": "bunx @biomejs/biome", + "check": "biome check . && stylelint 'src/styles/**/*.css'&& bun astro check" + }, + "trustedDependencies": ["sharp"], + "stylelint": { + "extends": "stylelint-config-standard", + "plugins": ["stylelint-scss"], + "customSyntax": "postcss-scss", + "rules": { + "at-rule-no-unknown": null, + "selector-class-pattern": null, + "scss/at-rule-no-unknown": true, + "custom-property-pattern": null + } + }, + "commitlint": { + "extends": ["@commitlint/config-conventional"] + }, + "dependencies": { + "@astrojs/mdx": "^2.0.2", + "@astrojs/rss": "^4.0.5", + "@astrojs/sitemap": "^3.1.1", + "@astrojs/tailwind": "^5.1.0", + "@astrojs/ts-plugin": "^1.3.1", + "astro-meta-tags": "^0.2.1", + "astro-seo": "^0.8.0", + "axios": "^1.6.5", + "sass": "^1.71.1", + "sharp": "^0.33.2", + "tailwind-merge": "^2.2.1", + "tailwindcss": "^3.4.1", + "web-vitals": "^3.5.0" + }, + "devDependencies": { + "@astrojs/check": "^0.5.10", + "@biomejs/biome": "^1.5.3", + "@types/node": "^20.8.3", + "astro": "^4.2.3", + "postcss-scss": "^4.0.9", + "stylelint": "^16.3.1", + "stylelint-config-standard": "^36.0.0", + "stylelint-scss": "^6.2.1", + "typescript": "^5.2.2" + }, + "packageManager": "bun@1.0.25" }