Add pre-commit hooks for linting and formatting
Set up pre-commit framework with ruff (backend) and ESLint/Prettier/tsc (frontend) hooks to catch issues locally before CI. Auto-format all frontend files with Prettier to comply with the new check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,14 +9,14 @@ import type {
|
||||
|
||||
export function createEncounter(
|
||||
runId: number,
|
||||
data: CreateEncounterInput,
|
||||
data: CreateEncounterInput
|
||||
): Promise<EncounterDetail> {
|
||||
return api.post(`/runs/${runId}/encounters`, data)
|
||||
}
|
||||
|
||||
export function updateEncounter(
|
||||
id: number,
|
||||
data: UpdateEncounterInput,
|
||||
data: UpdateEncounterInput
|
||||
): Promise<EncounterDetail> {
|
||||
return api.patch(`/encounters/${id}`, data)
|
||||
}
|
||||
@@ -25,7 +25,10 @@ export function deleteEncounter(id: number): Promise<void> {
|
||||
return api.del(`/encounters/${id}`)
|
||||
}
|
||||
|
||||
export function fetchEvolutions(pokemonId: number, region?: string): Promise<Evolution[]> {
|
||||
export function fetchEvolutions(
|
||||
pokemonId: number,
|
||||
region?: string
|
||||
): Promise<Evolution[]> {
|
||||
const params = region ? `?region=${encodeURIComponent(region)}` : ''
|
||||
return api.get(`/pokemon/${pokemonId}/evolutions${params}`)
|
||||
}
|
||||
@@ -34,6 +37,8 @@ export function fetchForms(pokemonId: number): Promise<Pokemon[]> {
|
||||
return api.get(`/pokemon/${pokemonId}/forms`)
|
||||
}
|
||||
|
||||
export function bulkRandomizeEncounters(runId: number): Promise<{ created: unknown[]; skippedRoutes: number }> {
|
||||
export function bulkRandomizeEncounters(
|
||||
runId: number
|
||||
): Promise<{ created: unknown[]; skippedRoutes: number }> {
|
||||
return api.post(`/runs/${runId}/encounters/bulk-randomize`, {})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user