brackt/.opencode/plugins/oxlint.ts
Chris Parsons e8e4981465
Add opencode oxlint plugin and UI refinements (#323)
* 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
2026-04-24 11:11:20 -07:00

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}`)
}
},
}
}