Repository navigation
Move linting to oxlint and oxfmt, and enable @shadcn/lint - #47
Merged
Merged
Conversation
Ultracite now drives oxlint and oxfmt instead of Biome. The config keeps the same file-level disagreements as before, ported to oxlint rule names, and turns off the rules from Ultracite's stricter oxlint preset that the repository has a stated reason to reject, each with that reason beside it. Markdown keeps its hand wrapping and code fences stay unformatted, because oxfmt was closing an open <html> snippet and adding semicolons to JSX. @shadcn/lint is registered with all six rules on. The site and the examples are held to the registry as a consumer would be; the registry itself is exempt, since it is the system the rules protect. The contracts name what a page may change on a part and why. Running the rules moved three things into the payload rather than around it: CommandDialog owns the cmdk spacing both callers were repeating, ComboboxTrigger drops the button label treatment because it shows a value, and a shadow-glow-current token replaces three hand-written swatch glows. Co-Authored-By: Claude <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Lint, typecheck, dead code and the registry build on pushes to main and on pull requests. The Next build stays out, because Vercel already runs it on every push. Co-Authored-By: Claude <[email protected]>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Biome is gone. Ultracite now drives oxlint and oxfmt.
pnpm lintandpnpm fixare unchanged on the outside. The config lives inoxlint.config.tsandoxfmt.config.ts; the three file-level overrides frombiome.jsoncmoved across under the same comments, and the inline Biome suppressions became oxlint ones.Ultracite's oxlint preset is stricter than its Biome one. It produced about 800 findings on the existing tree. The mechanical ones are fixed (unicode regex flags,
toSorted,pathdefault imports,import.meta.dirname, apostrophe escapes). Twelve rules are turned off in the config, each with its reason beside it. The largest was the pair that wanted every component rewritten as an arrow function; the payload stays as function declarations to match shadcn upstream.sort-keyswas reordering keyframe percentages intheme.mjs.Two formatter defaults are overridden. Ultracite's
proseWrap: "never"unwrapped every hand-wrapped paragraph in the docs, and embedded-code formatting was closing an intentionally open<html>snippet and adding semicolons to JSX examples. Both are off. The fallow-managed files and vendored skills are excluded from the formatter.@shadcn/lintis on, all six rules at error. The site and the examples are held to the registry as a consumer would be. The registry itself is exempt from the four consumer-facing rules, since it is the system being protected. Twelveno-restylecontracts open one more category where a part is a box the page fills (Content, Header, Footer, Title, table cells) or an unstyled Base UI trigger; each says why. The unknown-classes allow list names the hook classes declared inapp/site.css, by Table, and by sonner.Things the rules changed in the payload
Running the rules moved three things into the registry rather than around it. Reviewers should look at these first.
CommandDialognow carries the threecmdkspacing classes that both the site search and the command palette example were repeating onCommand.public/r/command.jsonchanges accordingly.ComboboxTriggerdrops Button's uppercase label treatment itself, since it shows a value. The combobox example no longer restyles Button.shadow-glow-currenttheme token (0 0 8px currentColor) replaces three hand-written swatch glows. This adds one line toglobals.cssand the theme item.Small behaviour changes on the site: the GitHub source link uses
rel="noreferrer", the hero terminal's scroll effect depends on the transcript length rather than the array, the root OG image re-exportssizeandcontentTypedirectly, and the build scripts need Node 20 or later fortoSorted.Verification
pnpm checkpasses end to end (lint, typecheck, dead code, registry build, Next build), andfallow auditpasses. I checked the changed parts in the browser: both command dialogs keep their spacing, the combobox trigger renders at normal weight and case, and all 28 swatches render their colours with the glow. The branch includes the three commits main gained meanwhile (thecnpackage, CodeBlock, card options); their new code needed a suppression comment ported, one hook class allowed, andBodyadded to the divider contract.Known follow-up
Every lint run prints four informational lines from the plugin about allow entries that match a class by exact name. That is its documented behaviour for hook classes. Underneath it is a real gap: the theme's
tracking-terminalandease-terminalscales are unknown to tailwind-merge, so a caller'stracking-normalloses to the component's own class, and the linter cannot classify those classes either. That is a design decision about what the registry ships and is left for a separate change.