diff --git a/.eslintrc.json b/.eslintrc.json index 471015f7..ef41ddeb 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -22,17 +22,18 @@ "rules": { "react/react-in-jsx-scope": "off", "react-hooks/rules-of-hooks": "error", - "react-hooks/exhaustive-deps": "warn" + "react-hooks/exhaustive-deps": "warn", + "no-empty": "warn" }, "settings": { "react": { "version": "detect" } }, + "ignorePatterns": ["src/bindings.ts"], "overrides": [ { - "files": ["src/**/*.ts", "src/**/*.tsx"], - "excludedFiles": ["src/bindings.ts"] + "files": ["src/**/*.ts", "src/**/*.tsx"] } ] } diff --git a/src/components/tabs/BoardsPage.tsx b/src/components/tabs/BoardsPage.tsx index f341f8d4..a5185fa9 100644 --- a/src/components/tabs/BoardsPage.tsx +++ b/src/components/tabs/BoardsPage.tsx @@ -1,7 +1,6 @@ import { ActionIcon, createStyles, - Group, ScrollArea, Stack, Tabs, diff --git a/src/utils/helperFunctions.ts b/src/utils/helperFunctions.ts index 10d8027f..b385fe8f 100644 --- a/src/utils/helperFunctions.ts +++ b/src/utils/helperFunctions.ts @@ -1,6 +1,6 @@ export function* takeWhile(collection: Iterable, condition: (item: T) => boolean): Generator { - for (let item of collection) { + for (const item of collection) { if (condition(item)) yield item; else break; } @@ -8,7 +8,7 @@ export function* takeWhile(collection: Iterable, condition: (item: T) => b export function* skipWhile(collection: Iterable, condition: (item: T) => boolean): Generator { let conditionBroken = false; - for (let item of collection) { + for (const item of collection) { if (!conditionBroken && !condition(item)) { conditionBroken = true; } diff --git a/src/utils/lichess.tsx b/src/utils/lichess.tsx index d1d55b7d..6b975356 100644 --- a/src/utils/lichess.tsx +++ b/src/utils/lichess.tsx @@ -6,7 +6,7 @@ import { invoke } from "./invoke"; import { NormalizedGame } from "./db"; import { parsePGN } from "./chess"; import { countMainPly } from "./treeReducer"; -import { fetch, Response, ResponseType } from "@tauri-apps/api/http"; +import { fetch, Response } from "@tauri-apps/api/http"; import { error } from "tauri-plugin-log-api"; import { LichessGamesOptions,