* Add opencode oxlint plugin and UI refinements - Add .opencode/plugins/oxlint.ts to run oxlint automatically on file edits - Refactor RankingDisplay into shared StatHelpers component - Add tied rank display support in home loader - Update navbar with NavLink for active state styling - Replace .reverse() with .toReversed() in RecentPicksFeed * Remove unused RankChangeIndicator import in LeagueRow
20 lines
514 B
TypeScript
20 lines
514 B
TypeScript
export const OxlintPlugin = async ({ $ }: { $: any }) => {
|
|
return {
|
|
"file.edited": async ({ filePath }: { filePath: string }) => {
|
|
if (
|
|
!filePath.endsWith(".ts") &&
|
|
!filePath.endsWith(".tsx") &&
|
|
!filePath.endsWith(".js") &&
|
|
!filePath.endsWith(".jsx")
|
|
) {
|
|
return
|
|
}
|
|
|
|
try {
|
|
await $`npm run lint:path -- ${filePath}`.quiet()
|
|
} catch (e: any) {
|
|
throw new Error(`oxlint found issues in ${filePath}:\n${e}`)
|
|
}
|
|
},
|
|
}
|
|
}
|