You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Proposal: Enforce import order rules via oxlint/oxfmt (or relax the docs) #2253
I noticed we have specific import order rules in CONTRIBUTING.md (Types first -> Ext packages -> Int aliases -> Relative), but they aren't currently enforced by our linters, so they often get missed across app/ and server/.
I originally tried to fix this manually across the codebase in #2231, but @ghostdevv correctly pointed out that unless we automate this via oxlint/oxfmt, it's not sustainable and will just lead to subjective diffs. Plus, Nuxt auto-imports handle a lot of this anyway.
I took a quick look at our current Vite+ tooling:
Current oxlint only supports the base ESLint sort-imports, which just alphabetizes members but doesn't handle path grouping or custom groupings.
eslint-plugin-import/order and related grouping rules aren't natively ported to oxc yet.
oxfmt doesn't currently easily accept JS-based import-sorting plugins like Prettier does.
Given the tooling limitations, I wanted to see what the team prefers:
Do we just hold off until oxlint natively supports advanced path-based grouping?
Should we update CONTRIBUTING.md to relax/remove the strict import order rules for now to prevent confusion for contributors?
Is there some other Vite+ config I missed that could handle this programmatically?
Happy to send a PR to update the docs if we decide to go with option 2!
I noticed we have specific import order rules in CONTRIBUTING.md (Types first -> Ext packages -> Int aliases -> Relative), but they aren't currently enforced by our linters, so they often get missed across app/ and server/.
Activity
ghostdevv commentedon Mar 24, 2026
I looked for this earlier and missed it 🤦♀️