-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pre-commit checks and fix its complaints (#547)
Closes #497 We can change the ``maxkb`` argument to our needs. Added some handy checks as well. Since we are using [``pre-commit``](https://pypi.org/p/pre-commit), we might want to add that to a ``requirements-dev.txt``.
- Loading branch information
Showing
23 changed files
with
157 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-added-large-files | ||
args: ["--maxkb", "5000"] | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
exclude_types: ["svg"] | ||
- id: trailing-whitespace | ||
exclude_types: ["svg"] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v3.1.0 | ||
hooks: | ||
- id: prettier | ||
args: ["--tab-width", "2", "--trailing-comma", "es5"] | ||
exclude_types: ["mdx"] | ||
exclude: "pnpm-lock.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,4 +40,3 @@ const { class: className } = Astro.props; | |
</g> | ||
</g> | ||
</svg> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,4 +43,3 @@ const { class: className } = Astro.props; | |
</g> | ||
</g> | ||
</svg> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,4 +38,3 @@ const { class: className } = Astro.props; | |
</g> | ||
</g> | ||
</svg> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,4 +43,3 @@ const { class: className } = Astro.props; | |
</g> | ||
</g> | ||
</svg> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,4 +39,3 @@ const { class: className } = Astro.props; | |
</g> | ||
</g> | ||
</svg> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,4 +44,3 @@ const { class: className } = Astro.props; | |
</g> | ||
</g> | ||
</svg> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export const Note = ({ children }: { children: string }) => { | ||
return <p className="note text-xl p-4 border-l-4 border-primary">{children}</p>; | ||
return ( | ||
<p className="note text-xl p-4 border-l-4 border-primary">{children}</p> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// Place any global data in this file. | ||
// You can import this data from anywhere in your site by using the `import` keyword. | ||
|
||
export const SITE_TITLE = 'Astro Blog'; | ||
export const SITE_DESCRIPTION = 'Welcome to my website!'; | ||
export const SITE_TITLE = "Astro Blog"; | ||
export const SITE_DESCRIPTION = "Welcome to my website!"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,93 +1,93 @@ | ||
/** @type {import('tailwindcss').Config} */ | ||
export default { | ||
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"], | ||
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"], | ||
|
||
theme: { | ||
colors: { | ||
black: "#000", | ||
white: "#fff", | ||
text: "var(--color-text)", | ||
transparent: "transparent", | ||
current: "currentColor", | ||
inherit: "inherit", | ||
theme: { | ||
colors: { | ||
black: "#000", | ||
white: "#fff", | ||
text: "var(--color-text)", | ||
transparent: "transparent", | ||
current: "currentColor", | ||
inherit: "inherit", | ||
|
||
"text-inverted": "var(--color-text-inverted)", | ||
"text-inverted": "var(--color-text-inverted)", | ||
|
||
"body-inverted": "#001c13", | ||
"body-background": "var(--color-body-background)", | ||
"body-light": "#888", | ||
"body-inverted": "#001c13", | ||
"body-background": "var(--color-body-background)", | ||
"body-light": "#888", | ||
|
||
"hero-primary": "var(--color-hero-primary)", | ||
"hero-secondary": "var(--color-hero-secondary)", | ||
"hero-primary": "var(--color-hero-primary)", | ||
"hero-secondary": "var(--color-hero-secondary)", | ||
|
||
primary: "var(--color-primary)", | ||
"primary-hover": "var(--color-primary-hover)", | ||
"primary-active": "var(--color-primary-active)", | ||
button: "var(--color-button)", | ||
"button-hover": "var(--color-button-hover)", | ||
primary: "var(--color-primary)", | ||
"primary-hover": "var(--color-primary-hover)", | ||
"primary-active": "var(--color-primary-active)", | ||
button: "var(--color-button)", | ||
"button-hover": "var(--color-button-hover)", | ||
|
||
secondary: "var(--color-secondary)", | ||
"secondary-dark": "var(--color-secondary-dark)", | ||
"secondary-darkest": "var(--color-secondary-darkest)", | ||
"secondary-light": "var(--color-secondary-light)", | ||
secondary: "var(--color-secondary)", | ||
"secondary-dark": "var(--color-secondary-dark)", | ||
"secondary-darkest": "var(--color-secondary-darkest)", | ||
"secondary-light": "var(--color-secondary-light)", | ||
|
||
"session-beginner": "#63d451", | ||
"session-intermediate": "#ffcd45", | ||
"session-advanced": "#d34848", | ||
"session-none": "var(--color-secondary-light)", | ||
"session-beginner": "#63d451", | ||
"session-intermediate": "#ffcd45", | ||
"session-advanced": "#d34848", | ||
"session-none": "var(--color-secondary-light)", | ||
|
||
"sponsor-keystone": "#5c9f92", | ||
"sponsor-diamond": "#568497", | ||
"sponsor-platinum": "#6b6c6e", | ||
"sponsor-gold": "#f5c251", | ||
"sponsor-silver": "#707172", | ||
"sponsor-bronze": "#6e6151", | ||
"sponsor-patron": "#a11217", | ||
"sponsor-keystone": "#5c9f92", | ||
"sponsor-diamond": "#568497", | ||
"sponsor-platinum": "#6b6c6e", | ||
"sponsor-gold": "#f5c251", | ||
"sponsor-silver": "#707172", | ||
"sponsor-bronze": "#6e6151", | ||
"sponsor-patron": "#a11217", | ||
|
||
red: "#ce3333", | ||
"keynoter-info": "hsla(0,0%,100%,.85)", | ||
}, | ||
extend: { | ||
aspectRatio: { | ||
hero: "2.4380530973", | ||
}, | ||
fontFamily: { | ||
system: ["system-ui", "sans-serif"], | ||
title: [ | ||
"Inter Variable", | ||
"-apple-system", | ||
"BlinkMacSystemFont", | ||
"Segoe UI", | ||
"Roboto", | ||
"Helvetica", | ||
"Arial", | ||
"sans-serif", | ||
"Apple Color Emoji", | ||
"Segoe UI Emoji", | ||
"Segoe UI Symbol", | ||
], | ||
sans: [ | ||
"-apple-system", | ||
"BlinkMacSystemFont", | ||
"Segoe UI", | ||
"Roboto", | ||
"Helvetica", | ||
"Arial", | ||
"sans-serif", | ||
"Apple Color Emoji", | ||
"Segoe UI Emoji", | ||
"Segoe UI Symbol", | ||
], | ||
}, | ||
typography: (theme) => ({ | ||
DEFAULT: { | ||
css: { | ||
color: theme("colors.text"), | ||
"--tw-prose-headings": theme("colors.white"), | ||
}, | ||
}, | ||
}), | ||
}, | ||
}, | ||
plugins: [require("@tailwindcss/typography")], | ||
red: "#ce3333", | ||
"keynoter-info": "hsla(0,0%,100%,.85)", | ||
}, | ||
extend: { | ||
aspectRatio: { | ||
hero: "2.4380530973", | ||
}, | ||
fontFamily: { | ||
system: ["system-ui", "sans-serif"], | ||
title: [ | ||
"Inter Variable", | ||
"-apple-system", | ||
"BlinkMacSystemFont", | ||
"Segoe UI", | ||
"Roboto", | ||
"Helvetica", | ||
"Arial", | ||
"sans-serif", | ||
"Apple Color Emoji", | ||
"Segoe UI Emoji", | ||
"Segoe UI Symbol", | ||
], | ||
sans: [ | ||
"-apple-system", | ||
"BlinkMacSystemFont", | ||
"Segoe UI", | ||
"Roboto", | ||
"Helvetica", | ||
"Arial", | ||
"sans-serif", | ||
"Apple Color Emoji", | ||
"Segoe UI Emoji", | ||
"Segoe UI Symbol", | ||
], | ||
}, | ||
typography: (theme) => ({ | ||
DEFAULT: { | ||
css: { | ||
color: theme("colors.text"), | ||
"--tw-prose-headings": theme("colors.white"), | ||
}, | ||
}, | ||
}), | ||
}, | ||
}, | ||
plugins: [require("@tailwindcss/typography")], | ||
}; |
Oops, something went wrong.