Skip to content

Commit

Permalink
Run husky directly
Browse files Browse the repository at this point in the history
  • Loading branch information
bhekanik committed Jan 30, 2024
1 parent a15aad0 commit d4df61b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
3 changes: 1 addition & 2 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -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"
}
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -41,4 +42,4 @@
"husky": "^9.0.7",
"lint-staged": "^15.2.0"
}
}
}
1 change: 0 additions & 1 deletion src/components/BookHeader.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ type Props = {
const {
book: {
data: { ISBN, tags, dateAdded, myRating, author },
slug,
},
} = Astro.props;
---
Expand Down
4 changes: 2 additions & 2 deletions src/components/BookRating.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const { rating } = Astro.props;

<p class="text-lg m-0">
Rating: {
Array.from({ length: rating ?? 0 }).map((_, i) => (
Array.from({ length: rating ?? 0 }).map(() => (
<span>
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -29,7 +29,7 @@ const { rating } = Astro.props;
</span>
))
}{
Array.from({ length: 5 - (rating ?? 0) }).map((_, i) => (
Array.from({ length: 5 - (rating ?? 0) }).map(() => (
<span class="opacity-50">
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down
3 changes: 1 addition & 2 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const pageTitle = "Bhekani Khumalo";
src="https://justreflections.bhekani.com/embed"
width="480"
height="320"
frameborder="0"
scrolling="no"></iframe>
></iframe>
</MainContainer>
</BaseLayout>

0 comments on commit d4df61b

Please sign in to comment.