From 22c703c97f888f0e5f3de95c4b27744d5d9d2c7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?= Date: Thu, 25 Jun 2026 11:49:28 +0200 Subject: [PATCH] chore: switch to oxfmt --- .editorconfig | 2 ++ .oxfmtrc.json | 3 +-- CONTRIBUTING.md | 6 +++--- docs/agents/style.md | 4 ++-- test-apps/native/.oxfmtrc.json | 1 - 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.editorconfig b/.editorconfig index 65365be68..e21a98ee1 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,6 +8,8 @@ root = true indent_style = space indent_size = 2 +max_line_length = 120 +quote_type = single end_of_line = lf charset = utf-8 diff --git a/.oxfmtrc.json b/.oxfmtrc.json index 9d5ce399a..074bfce7d 100644 --- a/.oxfmtrc.json +++ b/.oxfmtrc.json @@ -1,5 +1,4 @@ { - "printWidth": 120, - "singleQuote": true, + "ignorePatterns": [".changeset/**", "**/lib/**"], "trailingComma": "es5" } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d71400e56..128aaa87f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,7 +39,7 @@ yarn lint To fix formatting errors, run the following: ```sh -yarn lint --fix +yarn format ``` Remember to add tests for your change if possible. Run the unit tests by: @@ -50,9 +50,9 @@ yarn test ### Linting and tests -[ESLint](https://eslint.org/), [Prettier](https://prettier.io/), [TypeScript](https://www.typescriptlang.org/) +[ESLint](https://eslint.org/), [oxfmt](https://oxc.rs/docs/guide/usage/formatter.html), [TypeScript](https://www.typescriptlang.org/) -We use [TypeScript](https://www.typescriptlang.org/) for type checking, [ESLint](https://eslint.org/) with [Prettier](https://prettier.io/) for linting and formatting the code, and [Jest](https://jestjs.io/) for testing. +We use [TypeScript](https://www.typescriptlang.org/) for type checking, [ESLint](https://eslint.org/) for linting, [oxfmt](https://oxc.rs/docs/guide/usage/formatter.html) for formatting, and [Jest](https://jestjs.io/) for testing. Our pre-commit hooks verify that the linter and tests pass when committing. diff --git a/docs/agents/style.md b/docs/agents/style.md index 7e6c0fcb4..511f47683 100644 --- a/docs/agents/style.md +++ b/docs/agents/style.md @@ -9,6 +9,6 @@ Prefer small modules. Each package exports through its `src/index.ts` — add new public symbols there explicitly. -## Prettier config +## Formatter config -Single quotes, trailing commas (ES5), `printWidth: 120`. Run `yarn lint` to enforce. +Oxfmt is the formatter. Keep shared whitespace, quote, and line-length settings in `.editorconfig` when possible; use `.oxfmtrc.json` only for options EditorConfig cannot express. Run `yarn lint` to enforce code formatting. diff --git a/test-apps/native/.oxfmtrc.json b/test-apps/native/.oxfmtrc.json index 358db5d90..4e0da7209 100644 --- a/test-apps/native/.oxfmtrc.json +++ b/test-apps/native/.oxfmtrc.json @@ -1,6 +1,5 @@ { "arrowParens": "avoid", "bracketSameLine": true, - "singleQuote": true, "trailingComma": "all" }