Skip to content

Commit bbe9dda

Browse files
committed
fix: lint
1 parent bcaa4f7 commit bbe9dda

5 files changed

Lines changed: 19 additions & 33 deletions

File tree

package-lock.json

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"@docusaurus/preset-classic": "3.9.2",
3636
"@docusaurus/theme-mermaid": "3.9.2",
3737
"@mdx-js/react": "3.1.1",
38+
"complete-common": "2.21.0",
3839
"prism-react-renderer": "2.4.1",
3940
"raw-loader": "4.0.2",
4041
"react": "19.2.4",

src/pages/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ function HomepageHeader() {
1616
<p className="hero__subtitle">
1717
Strategies for{" "}
1818
<a
19-
id="landing-page-hanabi-link"
2019
href="https://boardgamegeek.com/boardgame/98778/hanabi"
21-
target="_blank"
20+
id="landing-page-hanabi-link"
2221
rel="noopener noreferrer"
22+
target="_blank"
2323
>
2424
Hanabi
2525
</a>

src/sidebarProgress.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import { isArray, isObject } from "complete-common";
12
import { useEffect } from "react";
23
import { CircularProgressbar } from "react-circular-progressbar";
34
import "react-circular-progressbar/dist/styles.css"; // eslint-disable-line @typescript-eslint/no-restricted-imports, import-x/no-unassigned-import
45
import sidebars from "../sidebars";
5-
import { isObject } from "./utils";
66

77
/**
88
* Extracts a list of page paths from a specific sidebar section or subsection.
@@ -12,7 +12,7 @@ import { isObject } from "./utils";
1212
*/
1313
export function getSidebarParts(...path: readonly string[]): readonly string[] {
1414
const { mainSidebar } = sidebars;
15-
if (mainSidebar === undefined || !Array.isArray(mainSidebar)) {
15+
if (mainSidebar === undefined || !isArray(mainSidebar)) {
1616
throw new TypeError(
1717
'Failed to parse the "mainSidebar" from "sidebars.ts".',
1818
);
@@ -28,7 +28,7 @@ export function getSidebarParts(...path: readonly string[]): readonly string[] {
2828

2929
if (!isObject(element)) {
3030
throw new TypeError(`Failed to find "${name}" in "sidebars.ts".`);
31-
} else if (!Array.isArray(element[name])) {
31+
} else if (!isArray(element[name])) {
3232
throw new TypeError(
3333
`Failed to parse "${name}" element from "sidebars.ts".`,
3434
);
@@ -49,7 +49,7 @@ export function getSidebarParts(...path: readonly string[]): readonly string[] {
4949

5050
if (isObject(element)) {
5151
const subParts = Object.values(element)[0];
52-
if (!Array.isArray(subParts)) {
52+
if (!isArray(subParts)) {
5353
throw new TypeError(
5454
'Failed to parse a sub-element array in "sidebars.ts".',
5555
);
@@ -96,7 +96,7 @@ export function createProgressComponent(
9696

9797
return (
9898
<div id="percent">
99-
<CircularProgressbar value={percentage} text={`${percentage}%`} />
99+
<CircularProgressbar text={`${percentage}%`} value={percentage} />
100100
</div>
101101
);
102102
};

src/utils.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)