Skip to content

Commit

Permalink
fix: spell checker
Browse files Browse the repository at this point in the history
  • Loading branch information
h8570rg committed Feb 1, 2025
1 parent 6943446 commit 9272893
Show file tree
Hide file tree
Showing 9 changed files with 1,073 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
"*.{js,jsx,ts,tsx,css,md}": ["prettier --write"],
"*.{js,jsx,ts,tsx,css,md}": ["prettier --write", "cspell"],
};
19 changes: 0 additions & 19 deletions .vscode/settings.json

This file was deleted.

6 changes: 3 additions & 3 deletions app/(main)/matches/_components/CreateMatchButton/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type State = {
};
};

const createMatchschema = z.object({
const createMatchSchema = z.object({
playersCount: schema.playersCount,
incline: schema.incline,
customIncline: schema.customIncline,
Expand All @@ -33,14 +33,14 @@ const createMatchschema = z.object({
calcMethod: schema.calcMethod,
});

export type InputSchema = z.input<typeof createMatchschema>;
export type InputSchema = z.input<typeof createMatchSchema>;

export async function createMatch(
prevState: State,
formData: FormData,
): Promise<State> {
const inclineFormData = formData.get("incline");
const validatedFields = createMatchschema.safeParse({
const validatedFields = createMatchSchema.safeParse({
playersCount: formData.get("playersCount"),
incline: inclineFormData,
customIncline:
Expand Down
23 changes: 23 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"version": "0.2",
"ignorePaths": [
"supabase/config.toml",
"supabase/migrations",
"lib/database.types.ts"
],
"words": [
"jankiroku",
"supabase",
"heroui",
"rocknroll",
"appbar",
"pressable",
"hoverable",
"firestore",
"fkey",
"Postgrest",
"ilike",
"Inbucket"
]
}
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export default [
{
settings: {
tailwindcss: {
/* cspell:disable-next-line */
callees: ["classNames"],
},
},
Expand Down
4 changes: 4 additions & 0 deletions lib/migration/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ type OldData = {
bonus: number;
uma: number[];
title: string;
/* cspell:disable-next-line */
kaeshi: number;
defaultScore: number;
};
Expand Down Expand Up @@ -271,6 +272,7 @@ async function createRule({
rate,
bonus,
uma,
/* cspell:disable-next-line */
kaeshi,
defaultScore,
},
Expand All @@ -285,6 +287,7 @@ async function createRule({
rate: number;
bonus: number;
uma: number[];
/* cspell:disable-next-line */
kaeshi: number;
defaultScore: number;
};
Expand All @@ -303,6 +306,7 @@ async function createRule({
calc_method: calcMethodMap[round],
chip_rate: chip * rate * 10,
crack_box_bonus: bonus * 1000,
/* cspell:disable-next-line */
default_calc_points: kaeshi,
default_points: defaultScore,
match_id: matchId,
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/score.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const rule4: Rule = {
},
};

describe("calclate score", () => {
describe("calculate score", () => {
it("round", () => {
expect(round(0)).toBe(0);
expect(round(100)).toBe(0);
Expand Down
Loading

0 comments on commit 9272893

Please sign in to comment.