Skip to content

Commit

Permalink
fix eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscoBSalgueiro committed Oct 29, 2023
1 parent beb42b4 commit 94bda49
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
7 changes: 4 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
]
}
1 change: 0 additions & 1 deletion src/components/tabs/BoardsPage.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
ActionIcon,
createStyles,
Group,
ScrollArea,
Stack,
Tabs,
Expand Down
4 changes: 2 additions & 2 deletions src/utils/helperFunctions.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@

export function* takeWhile<T>(collection: Iterable<T>, condition: (item: T) => boolean): Generator<T> {
for (let item of collection) {
for (const item of collection) {
if (condition(item)) yield item;
else break;
}
}

export function* skipWhile<T>(collection: Iterable<T>, condition: (item: T) => boolean): Generator<T> {
let conditionBroken = false;
for (let item of collection) {
for (const item of collection) {
if (!conditionBroken && !condition(item)) {
conditionBroken = true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/lichess.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 94bda49

Please sign in to comment.