Skip to content

Commit

Permalink
update prettier (#781)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshka authored Oct 21, 2024
1 parent bde7fa7 commit 4697fdc
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 21 deletions.
2 changes: 2 additions & 0 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[tools]
node = "lts"
2 changes: 1 addition & 1 deletion components/libs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const Lib: FC<{ lib: Library }> = ({ lib }) => (
"is-half",
"is-flex",
"tk-lib",
`tk-lib-${lib.id}`
`tk-lib-${lib.id}`,
)}
>
<div className="card">
Expand Down
2 changes: 1 addition & 1 deletion components/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function Level2({ href, menu }) {
items.unshift(
<li key={menu.key} className={className}>
<a href={menu.href}>{menu.data.subtitle}</a>
</li>
</li>,
);
}

Expand Down
2 changes: 1 addition & 1 deletion components/stack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const Layer: FC<{ layer: StackLayer }> = ({ layer }) => (
export default function Stack() {
useEffect(() => {
var stack = document.getElementsByClassName(
"tk-stack-active"
"tk-stack-active",
) as HTMLCollectionOf<HTMLElement>;
var links = document.querySelectorAll(".tk-stack .menu li");
var lines = document.getElementById("tk-stack-lines");
Expand Down
6 changes: 3 additions & 3 deletions lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const contentDir = path.join(process.cwd(), "content").replace(/\\/g, "/");

// Merge app level props in with page props
export function withAppProps(
props: { props: Record<PropertyKey, unknown> } = { props: {} }
props: { props: Record<PropertyKey, unknown> } = { props: {} },
) {
const blog = getLastBlog();
delete blog.body;
Expand Down Expand Up @@ -108,7 +108,7 @@ function setPrevNext(page, menu) {
}
},
undefined,
undefined
undefined,
);

return page;
Expand All @@ -117,7 +117,7 @@ function setPrevNext(page, menu) {
// Build a list of paths from the sitemap
function collectPaths(
level: Record<string, { nested?: string[]; href?: string }>,
prefix = ""
prefix = "",
) {
let out = [];

Expand Down
2 changes: 1 addition & 1 deletion lib/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@ export const toHTML = async (raw) => {
.use(rehyperBlockquotePlus, rehyperBlockquotePlusOptions)
// @ts-expect-error: unified's plugin type mistakenly selects the Array<void> union variant
.use(rehypeStringify)
.process(raw)
.process(raw),
);
};
19 changes: 10 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"devDependencies": {
"@types/node": "^18.11.18",
"@types/react": "^18.0.26",
"prettier": "^2.8.2",
"prettier": "3.3.3",
"typescript": "^4.9.4"
}
}
13 changes: 9 additions & 4 deletions styles/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,15 @@ $tk-lib-tracing: $purple;
$tk-lib-bytes: $blue;

// Per lib styling: [ name, color, size, logo-adjust ]
$libs: "tokio" black 3.8rem -60%, "runtime" $tk-lib-runtime 2.2rem -22%,
"hyper" $tk-lib-hyper 100% -50%, "tonic" $tk-lib-tonic 100% -25%,
"tower" $tk-lib-tower 100% -52%, "mio" $tk-lib-mio 100% -41%,
"tracing" $tk-lib-tracing 100% -31%, "bytes" $tk-lib-bytes 100% -30%;
$libs:
"tokio" black 3.8rem -60%,
"runtime" $tk-lib-runtime 2.2rem -22%,
"hyper" $tk-lib-hyper 100% -50%,
"tonic" $tk-lib-tonic 100% -25%,
"tower" $tk-lib-tower 100% -52%,
"mio" $tk-lib-mio 100% -41%,
"tracing" $tk-lib-tracing 100% -31%,
"bytes" $tk-lib-bytes 100% -30%;

// Bulma color variables
$primary: $cream;
Expand Down

0 comments on commit 4697fdc

Please sign in to comment.