diff --git a/.lintstagedrc.json b/.lintstagedrc.json index c9eaaa2..2f3f98c 100644 --- a/.lintstagedrc.json +++ b/.lintstagedrc.json @@ -1,4 +1,3 @@ { - "src/**/*.{js,ts,tsx,astro}": "eslint --cache --fix", - "src/**/*.{js,ts,tsx,css,md,astro}": "prettier --write" + "src/**/*.{js,ts,tsx,astro}": "pnpm lint" } \ No newline at end of file diff --git a/package.json b/package.json index 07a3b02..7a9c877 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,11 @@ "scripts": { "dev": "astro dev", "start": "astro dev", - "build": "astro check && astro build", + "lint": "astro check", + "build": "pnpm lint && astro build", "preview": "astro preview", "astro": "astro", - "prepare": "husky" + "prepare": "pnpm dlx husky" }, "dependencies": { "@astrojs/check": "^0.3.4", @@ -41,4 +42,4 @@ "husky": "^9.0.7", "lint-staged": "^15.2.0" } -} +} \ No newline at end of file diff --git a/src/components/BookHeader.astro b/src/components/BookHeader.astro index 0c6041c..a3ed22c 100644 --- a/src/components/BookHeader.astro +++ b/src/components/BookHeader.astro @@ -13,7 +13,6 @@ type Props = { const { book: { data: { ISBN, tags, dateAdded, myRating, author }, - slug, }, } = Astro.props; --- diff --git a/src/components/BookRating.astro b/src/components/BookRating.astro index 85afbfa..2c7c518 100644 --- a/src/components/BookRating.astro +++ b/src/components/BookRating.astro @@ -10,7 +10,7 @@ const { rating } = Astro.props;
Rating: { - Array.from({ length: rating ?? 0 }).map((_, i) => ( + Array.from({ length: rating ?? 0 }).map(() => (