diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 0000000..ca25008 --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,15 @@ +{ + "hooks": { + "PostToolUse": [ + { + "matcher": "Edit|Write", + "hooks": [ + { + "type": "command", + "command": "jq -r '.tool_input.file_path // empty' | xargs -I{} sh -c 'case \"{}\" in *.ts|*.tsx) ./node_modules/.bin/oxlint \"{}\" 2>&1 ;; esac'" + } + ] + } + ] + } +} diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 0000000..a011811 --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,58 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": ["react", "typescript", "vitest", "unicorn", "import"], + "env": { + "browser": true, + "node": true, + "es2022": true + }, + "categories": { + "correctness": "error", + "suspicious": "warn" + }, + "rules": { + "no-console": "warn", + "no-var": "error", + "prefer-const": "error", + "eqeqeq": ["error", "always"], + "no-unused-vars": "off", + "no-undef": "off", + + "typescript/no-unused-vars": [ + "error", + { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" } + ], + "typescript/no-explicit-any": "warn", + "typescript/no-non-null-assertion": "warn", + "typescript/consistent-type-imports": [ + "error", + { "prefer": "type-imports" } + ], + + "react/react-in-jsx-scope": "off", + "react/rules-of-hooks": "error", + "react/exhaustive-deps": "error", + "react/jsx-key": "error", + "react/no-array-index-key": "error", + "react/self-closing-comp": "warn", + + "import/no-duplicates": "error" + }, + "overrides": [ + { + "files": ["**/__tests__/**", "**/*.test.ts", "**/*.test.tsx", "cypress/**"], + "rules": { + "no-console": "off", + "typescript/no-explicit-any": "off" + } + } + ], + "ignorePatterns": [ + "build/**", + "dist/**", + "node_modules/**", + "drizzle/**", + ".react-router/**", + "cypress/fixtures/**" + ] +} diff --git a/app/components/DraftGrid.tsx b/app/components/DraftGrid.tsx index 11b3c26..4411e1c 100644 --- a/app/components/DraftGrid.tsx +++ b/app/components/DraftGrid.tsx @@ -92,11 +92,11 @@ export function DraftGrid({ const round = roundIndex + 1; const isEvenRound = round % 2 === 0; const displayPicks = isEvenRound - ? [...roundPicks].reverse() + ? [...roundPicks].toReversed() : roundPicks; return ( -