Skip to content

Commit

Permalink
chore: bump prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
valotas committed Jun 26, 2024
1 parent d482892 commit ae215c6
Show file tree
Hide file tree
Showing 24 changed files with 110 additions and 68 deletions.
66 changes: 54 additions & 12 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
"eslint": "^8.10.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-prettier": "^5.1.3",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-fetch-mock": "^3.0.3",
"npm-run-all": "^4.1.5",
"prettier": "^2.5.1",
"prettier": "^3.3.2",
"sharp": "^0.31.1",
"ts-jest": "^29.1.5",
"typescript": "5.5"
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/FetchTracker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function FetchTracker({ children }: PropsWithChildren<unknown>) {
return result;
});
},
[fetchContent]
[fetchContent],
);

return (
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/History.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class History {
detail: {
state: payload,
},
})
}),
);
}
}
Expand Down
12 changes: 6 additions & 6 deletions packages/frontend/src/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ export function Icon({ name, className, size = "8" }: IconProps) {
name == "linkedin"
? LinkedInIcon
: name === "github"
? Github
: name === "twitter"
? Twitter
: name === "ig"
? Instagram
: undefined;
? Github
: name === "twitter"
? Twitter
: name === "ig"
? Instagram
: undefined;

if (!TheIcon) {
return null;
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/LoadingBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function creatingAnimation() {
margin-left: 100%;
width: 0;
}
`
`,
);
}

Expand Down
12 changes: 6 additions & 6 deletions packages/frontend/src/PageRenderer.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe("PageRenderer", () => {
it("renders a page when a payload is given", async () => {
const props = { bodyMarkdown: "the body", title: "payload title" };
const { container } = await render(
<PageRenderer payload={JSON.stringify(props)} />
<PageRenderer payload={JSON.stringify(props)} />,
);

const title = container.querySelector("h1");
Expand Down Expand Up @@ -71,7 +71,7 @@ describe("PageRenderer", () => {
bodyMarkdown: "the body",
title: "initial title",
})}
/>
/>,
);

act(() => handler({ state: JSON.stringify(newProps) }));
Expand All @@ -85,7 +85,7 @@ describe("PageRenderer", () => {
const { container } = await render(
<PageRenderer
payload={JSON.stringify({ bodyMarkdown: "", title: "initial title" })}
/>
/>,
);

act(() => handler({ detail: { state: JSON.stringify(newProps) } }));
Expand All @@ -102,7 +102,7 @@ describe("PageRenderer", () => {
bodyMarkdown: "the body",
title: "initial title",
})}
/>
/>,
);

act(() => handler({ state: JSON.stringify(newProps) }));
Expand All @@ -118,7 +118,7 @@ describe("PageRenderer", () => {
bodyMarkdown: "the body",
title: "initial title",
})}
/>
/>,
);

act(() => handler({ detail: { state: JSON.stringify(newProps) } }));
Expand All @@ -134,7 +134,7 @@ describe("PageRenderer", () => {
bodyMarkdown: "the body",
title: "initial title",
})}
/>
/>,
);

act(() => handler({ state: JSON.stringify(newProps) }));
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/PageRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function usePageProps(initial: PageRendererProps) {
updateProps({ payload: state });
updateScrollTop(e.detail ? true : false);
},
[0]
[0],
);

useEffect(() => {
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/src/links.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe("links", () => {
expect(pushState).toHaveBeenCalledWith(
payload,
expect.any(String),
href
href,
);
});
});
Expand All @@ -102,7 +102,7 @@ describe("links", () => {
expect(pushState).toHaveBeenCalledWith(
payload,
expect.any(String),
`${href}/`
`${href}/`,
);
});
});
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/src/links.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function Anchor({
});
}
},
[href, title]
[href, title],
);

return (
Expand Down Expand Up @@ -74,7 +74,7 @@ export function Link({
noUnderline
? ""
: "border-b-1 border-gray-300 hover:border-gray-500 leading-tight inline-block",
className
className,
)}
>
{children}
Expand Down
6 changes: 3 additions & 3 deletions packages/frontend/src/marked/Html.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Html } from "./Html";
describe("Html", () => {
it("should render html", async () => {
const { container } = render(
<Html raw="aa" pre={false} text="" type="html" children={[]} />
<Html raw="aa" pre={false} text="" type="html" children={[]} />,
);

expect(container.innerHTML).toContain(">aa</div>");
Expand All @@ -26,7 +26,7 @@ describe("Html", () => {
text=""
type="html"
children={[]}
/>
/>,
);

expect(container.innerHTML).toContain(`Some content`);
Expand All @@ -50,7 +50,7 @@ describe("Html", () => {
text=""
type="html"
children={[]}
/>
/>,
);

expect(container.innerHTML).not.toContain(`<script>`);
Expand Down
14 changes: 7 additions & 7 deletions packages/frontend/src/marked/MarkedContent.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe("MarkedContent", () => {

it("should render paragraphs with strong or emphasized text", async () => {
const { container } = await renderMarked(
"this a **very strong** _paragraph_!"
"this a **very strong** _paragraph_!",
);

const strong = container.querySelector("strong");
Expand Down Expand Up @@ -69,7 +69,7 @@ this is a _paragraph_!

it("should render code blocks with a class derived from the language", async () => {
const source = ["this is a", "", "```java", "a code block", "```"].join(
"\n"
"\n",
);
const { container } = await renderMarked(source);

Expand Down Expand Up @@ -119,7 +119,7 @@ this is a _paragraph_!

it("should render links", async () => {
const { container } = await renderMarked(
"this is a [link](/to/another/page) to another page"
"this is a [link](/to/another/page) to another page",
);
const link = container.querySelector("a");

Expand All @@ -129,20 +129,20 @@ this is a _paragraph_!

it("should not render unrecognised scripts", () => {
const { container } = renderMarked(
'this is some\n<script scr="path/to/script"></script>'
'this is some\n<script scr="path/to/script"></script>',
);
expect(container.innerHTML).not.toContain("script");
});

describe("gists", () => {
it("should replace gist scripts with a component", async () => {
const { container } = renderMarked(
'<script src="https://gist.github.com/valotas/09f8fabc1a1db4b108b3.js?file=expectObservable"></script>'
'<script src="https://gist.github.com/valotas/09f8fabc1a1db4b108b3.js?file=expectObservable"></script>',
);

await waitFor(() => {
expect(container.innerHTML).toContain(
"https://gist.github.com/valotas/09f8fabc1a1db4b108b3"
"https://gist.github.com/valotas/09f8fabc1a1db4b108b3",
);
});
});
Expand All @@ -154,7 +154,7 @@ this is a _paragraph_!
].forEach(({ file, language }) => {
it(`renders 'language-${language}' for file '${file}'`, async () => {
const { container } = renderMarked(
`<script src="https://gist.github.com/valotas/09f8fabc1a1db4b108b3.js?file=${file}"></script>`
`<script src="https://gist.github.com/valotas/09f8fabc1a1db4b108b3.js?file=${file}"></script>`,
);

await waitFor(() => {
Expand Down
6 changes: 3 additions & 3 deletions packages/frontend/src/md.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ this is some paragraph
# Content
this is some paragraph
`.trim()
`.trim(),
);
});

Expand All @@ -75,7 +75,7 @@ This is some paragraph of the second section
const { description } = md.parse(initial);

expect(description.trim()).toEqual(
`this is the description of the first section`
`this is the description of the first section`,
);
});

Expand All @@ -102,7 +102,7 @@ Well, the idea in OO languages is very simple. You have a class and you have a p
Recently I [had a look at the Dart programming language][thoughts-on-dart] and that reminded me of the getters and setters mechanism that someone has with [C#][csharp]. So let's have a look at them.
[thoughts-on-dart]: http://valotas.com/dart-language/
[csharp]: http://en.wikipedia.org/wiki/C_Sharp_(programming_language)`.trim()
[csharp]: http://en.wikipedia.org/wiki/C_Sharp_(programming_language)`.trim(),
);
});

Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/md.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function parseHeader(raw: string): HeaderMeta {
draft: false,
skipIndex: false,
tags: [],
}
},
);
}

Expand Down
Loading

0 comments on commit ae215c6

Please # to comment.