Skip to content

Replace oxfmt with Prettier via eslint-plugin-format#45

Merged
gtbuchanan merged 1 commit intomainfrom
feature/replace-oxfmt
Apr 20, 2026
Merged

Replace oxfmt with Prettier via eslint-plugin-format#45
gtbuchanan merged 1 commit intomainfrom
feature/replace-oxfmt

Conversation

@gtbuchanan
Copy link
Copy Markdown
Owner

@gtbuchanan gtbuchanan commented Apr 19, 2026

Summary

Closes #43.

  • Remove @gtbuchanan/oxfmt-config package and standalone oxfmt dependency
  • Add eslint-plugin-format with Prettier as the backing formatter for JSON, Markdown, and YAML
  • Prettier plugins (sort-json, multiline-arrays, packagejson) resolved as file:// URLs via createRequire for reliable resolution in synckit worker threads under pnpm strict hoisting
  • Use json-stringify parser for package.json (registered by prettier-plugin-packagejson) so both conventional key sorting and multiline array expansion compose correctly
  • Remove oxfmt pre-commit hook; ESLint hook now covers all formatted file types
  • Add e2e test verifying plugin order (key sorting + array expansion) and format correctness for Markdown and YAML

Test plan

  • pnpm pipeline check passes (typecheck, lint, 269 tests)
  • Pre-commit hooks pass
  • E2E: JSON key sorting + multiline array expansion via Prettier plugins
  • E2E: Markdown proseWrap preserve (long lines not hard-wrapped)
  • E2E: YAML single-quote formatting
  • Unit: configure() includes format/prettier configs for JSON, package.json, Markdown, YAML
  • CI passes

🤖 Generated with Claude Code

@gtbuchanan gtbuchanan force-pushed the feature/replace-oxfmt branch 7 times, most recently from 93b9fd2 to 26d55b4 Compare April 20, 2026 02:31
Remove the standalone oxfmt formatter and oxfmt-config package.
Formatting for JSON, Markdown, and YAML is now handled by Prettier
running as an ESLint rule through eslint-plugin-format, consolidating
all linting and formatting under ESLint.

- Add eslint-plugin-format, prettier, prettier-plugin-sort-json,
  prettier-plugin-multiline-arrays, and prettier-plugin-packagejson
  to @gtbuchanan/eslint-config
- Create format.ts plugin with configs for JSON, JSONC, package.json,
  Markdown, and YAML
- Use json-stringify parser for package.json (registered by
  prettier-plugin-packagejson) so both key sorting and multiline
  array expansion compose correctly
- Resolve Prettier plugins as file:// URLs via createRequire for
  reliable resolution in synckit worker threads under pnpm strict
  hoisting
- Add **/*.md to typescript nonTsFiles to prevent type-checked rules
  on Markdown files
- Remove oxfmt pre-commit hook; expand ESLint hook to cover all
  formatted file types
- Remove oxfmt-config package, root oxfmt.config.ts, and codecov
  coverage entries

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gtbuchanan gtbuchanan force-pushed the feature/replace-oxfmt branch from 26d55b4 to 646e844 Compare April 20, 2026 02:41
@gtbuchanan gtbuchanan merged commit ce5033e into main Apr 20, 2026
7 of 8 checks passed
@gtbuchanan gtbuchanan deleted the feature/replace-oxfmt branch April 20, 2026 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider replacing oxfmt with eslint-plugin-format

1 participant