From 345a71ea5be89551ac3623e9bfd37814621ad026 Mon Sep 17 00:00:00 2001 From: jamerrq Date: Sat, 13 Apr 2024 22:57:36 -0500 Subject: [PATCH] chore: update husky config --- .husky/pre-commit | 4 ++++ package.json | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..a36ca6a --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +bun lint:fix diff --git a/package.json b/package.json index bdb9e4f..cb0946d 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,8 @@ "build": "astro check && astro build", "preview": "deno run --allow-net --allow-read --allow-env ./dist/server/entry.mjs", "astro": "astro", - "lint": "prettier --write \"**/*.{js,jsx,ts,tsx,md,mdx,astro}\" && eslint --fix \"src/**/*.{js,ts,jsx,tsx,astro}\"", + "lint": "prettier --check \"**/*.{js,jsx,ts,tsx,md,mdx,astro}\" && eslint \"src/**/*.{js,ts,jsx,tsx,astro}\"", + "lint:fix": "prettier --write \"**/*.{js,jsx,ts,tsx,md,mdx,astro}\" && eslint --fix \"src/**/*.{js,ts,jsx,tsx,astro}\"", "check-tsx": "tsc --noEmit --skipLibCheck --project tsconfig.json", "local-build-and-preview": "bun lint && bun check-tsx && bun run build && bun run preview", "build-unlighthouse-report": "unlighthouse --site jamerrq.deno.dev --build-static"