diff --git a/.drone.yml b/.drone.yml index 8d6d8ba..64b6d22 100644 --- a/.drone.yml +++ b/.drone.yml @@ -15,6 +15,10 @@ steps: image: node-pnpm:16-alpine commands: - pnpm format:check +- name: Lint code + image: node-pnpm:16-alpine + commands: + - pnpm lint - name: Build site image: node-pnpm:16-alpine commands: diff --git a/package.json b/package.json index f0175c1..bac456d 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "preview": "vite preview", "format": "prettier --write .", "format:check": "prettier --check .", - "lint": "eslint ." + "lint": "eslint . --max-warnings 0" }, "dependencies": { "@fontsource/noto-sans-symbols-2": "^4.5.9", diff --git a/src/utils/board.ts b/src/utils/board.ts index 2596e1c..42fd05b 100644 --- a/src/utils/board.ts +++ b/src/utils/board.ts @@ -96,19 +96,18 @@ export const POSITION_5 = export const POSITION_6 = 'r4rk1/1pp1qppp/p1np1n2/2b1p1B1/2B1P1b1/P1NP1N2/1PP1QPPP/R4RK1 w - - 0 10'; -/* eslint @typescript-eslint/no-explicit-any: off */ -{ - (window as any).START_FEN = START_FEN; - (window as any).TEST_FEN = TEST_FEN; - (window as any).PAWN_BUG_TEST_FEN = PAWN_BUG_TEST_FEN; - (window as any).KNIGHT_TEST_FEN = KNIGHT_TEST_FEN; - (window as any).LEGAL_MOVE_TEST_FEN = LEGAL_MOVE_TEST_FEN; - (window as any).POSITION_2 = POSITION_2; - (window as any).POSITION_3 = POSITION_3; - (window as any).POSITION_4 = POSITION_4; - (window as any).POSITION_5 = POSITION_5; - (window as any).POSITION_6 = POSITION_6; -} +/* eslint-disable @typescript-eslint/no-explicit-any */ +(window as any).START_FEN = START_FEN; +(window as any).TEST_FEN = TEST_FEN; +(window as any).PAWN_BUG_TEST_FEN = PAWN_BUG_TEST_FEN; +(window as any).KNIGHT_TEST_FEN = KNIGHT_TEST_FEN; +(window as any).LEGAL_MOVE_TEST_FEN = LEGAL_MOVE_TEST_FEN; +(window as any).POSITION_2 = POSITION_2; +(window as any).POSITION_3 = POSITION_3; +(window as any).POSITION_4 = POSITION_4; +(window as any).POSITION_5 = POSITION_5; +(window as any).POSITION_6 = POSITION_6; +/* eslint-enable @typescript-eslint/no-explicit-any */ export interface GameState { board: Board;