Repository navigation
chore: adopt oxlint and oxfmt - #33
Merged
Merged
Conversation
commit: |
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.
Replaces Prettier with oxfmt and adds oxlint as a new lint gate.
Formatting
.oxfmtrc.jsonwas generated withoxfmt --migrate=prettier. It keeps the previous options (semi, double quotes,trailingComma: all,printWidth: 100) and every ignore pattern, including the release-pleaseCHANGELOG.mdand manifest entries, so release PRs still passformat:check.sortPackageJsonis off, sopackage.jsonkey order doesn't change.Across 112 files, oxfmt and Prettier disagree on only two. Both are multi-line union type casts, which oxfmt now wraps with a leading
|(node-entry-loader.ts,server-functions.ts)..prettierrc.json,.prettierignoreand theprettierdependency are removed.Linting
.oxlintrc.jsonturns on the typescript, unicorn, oxc, import, react, promise and node plugins, with thecorrectnesscategory set to error and run with--deny-warnings. The current tree has no findings.I also tried the
suspiciouscategory. It reported 251 findings and none were bugs:react-in-jsx-scope, which doesn't apply with the automatic JSX runtime.Module._compile, andresolveshadowing in tests.So
suspiciousstays off.react/set-state-in-effectis also off, because the example apps use theuseEffect(() => setMounted(true))hydration gate on purpose.Gates
pnpm lint/pnpm lint:fixadded.pnpm format/format:checknow run oxfmt.pnpm lintruns in the Husky pre-commit hook and inci.ymlandrelease.yml, right afterformat:check.test/release-contracts.test.mjsnow checks the release-please ignore entries in.oxfmtrc.jsoninstead of.prettierignore.Verification
pnpm format:check,pnpm lint,pnpm typecheck,pnpm buildandpnpm test:core(81/81) pass locally. I didn't run the e2e suite locally; CI covers it.