From 65f780e2454da46719ee65a6bb4a1c36c11912da Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?=
Date: Thu, 28 Aug 2025 09:09:23 +0200
Subject: [PATCH 1/4] prettier check
---
.codecov.yml | 2 +-
.github/actions/setup-deps-rn-nightly/action.yml | 2 +-
.github/workflows/ci.yml | 3 +++
.github/workflows/website.yml | 2 +-
.prettierignore | 4 ++++
CLAUDE.md | 16 ++++++++++++++--
eslint.config.mjs | 5 +----
examples/basic/jest.config.js | 4 +---
examples/cookbook/README.md | 6 +++++-
.../app/network-requests/__tests__/test-utils.ts | 4 ++--
jest.config.js | 8 ++++----
typings/index.flow.js | 8 ++++----
.../12.x/cookbook/advanced/network-requests.md | 2 +-
.../docs/12.x/cookbook/state-management/jotai.md | 4 ++--
website/docs/12.x/docs/api/queries.mdx | 6 ------
.../13.x/cookbook/advanced/network-requests.md | 2 +-
.../docs/13.x/cookbook/state-management/jotai.md | 4 ++--
website/docs/13.x/docs/api/events/fire-event.mdx | 2 +-
website/docs/13.x/docs/api/queries.mdx | 6 ------
website/docs/13.x/docs/guides/react-19.mdx | 8 ++++++++
20 files changed, 56 insertions(+), 42 deletions(-)
create mode 100644 .prettierignore
diff --git a/.codecov.yml b/.codecov.yml
index b357b453c..43e3f2a3b 100644
--- a/.codecov.yml
+++ b/.codecov.yml
@@ -8,7 +8,7 @@ coverage:
target: 80% # Required patch coverage target
project:
default:
- threshold: 0.5% # Allowable coverage drop in percentage points
+ threshold: 0.5% # Allowable coverage drop in percentage points
comment:
behavior: default
diff --git a/.github/actions/setup-deps-rn-nightly/action.yml b/.github/actions/setup-deps-rn-nightly/action.yml
index 2f93a71df..df24b1347 100644
--- a/.github/actions/setup-deps-rn-nightly/action.yml
+++ b/.github/actions/setup-deps-rn-nightly/action.yml
@@ -28,5 +28,5 @@ runs:
- name: Switch to React Native Nightly
run: |
- yarn add -D react-native@nightly @react-native/babel-preset@nightly react@19.1.1 react-test-renderer@19.1.1
+ yarn add -D react-native@nightly @react-native/babel-preset@nightly react@19.1.1 react-test-renderer@19.1.1
shell: bash
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index feb8c6251..0a9a08f26 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -27,6 +27,9 @@ jobs:
- name: Lint
run: yarn lint
+ - name: Prettier
+ run: yarn prettier --check .
+
typecheck:
runs-on: ubuntu-latest
name: Typecheck
diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml
index 3ca569221..f302fc8e3 100644
--- a/.github/workflows/website.yml
+++ b/.github/workflows/website.yml
@@ -54,4 +54,4 @@ jobs:
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
- user_email: 41898282+github-actions[bot]@users.noreply.github.com
\ No newline at end of file
+ user_email: 41898282+github-actions[bot]@users.noreply.github.com
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 000000000..d0168acd4
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,4 @@
+node_modules/
+.yarn
+
+flow-typed/
\ No newline at end of file
diff --git a/CLAUDE.md b/CLAUDE.md
index 032f9be8c..9b2bdfde3 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -9,22 +9,26 @@ This is the **React Native Testing Library (RNTL)** - a comprehensive testing so
## Key Development Commands
### Testing
+
- `yarn test` - Run all tests
- `yarn test:ci` - Run tests with CI optimizations (maxWorkers=2)
- `yarn test:ci:coverage` - Run tests with coverage reporting
### Building
+
- `yarn build` - Full build process (clean, build JS, build types, copy flow types)
- `yarn build:js` - Build JavaScript using Babel
- `yarn build:ts` - Build TypeScript declarations
- `yarn clean` - Clean build directory
### Code Quality
+
- `yarn typecheck` - Run TypeScript compiler
- `yarn lint` - Run ESLint with caching
- `yarn validate` - Run lint + typecheck + test (pre-commit validation)
### Testing Single Files
+
To test a specific file: `yarn test path/to/test.test.tsx`
## Architecture Overview
@@ -47,6 +51,7 @@ To test a specific file: `yarn test path/to/test.test.tsx`
### Query System
The library provides three query variants for each selector:
+
- `get*` - Throws if not found (for assertions)
- `query*` - Returns null if not found (for conditional logic)
- `find*` - Returns Promise, waits for element (for async operations)
@@ -59,16 +64,19 @@ The library provides three query variants for each selector:
## Configuration
### Jest Setup
+
- Main Jest config: `jest.config.js`
- Setup file: `jest-setup.ts`
- Uses React Native preset with custom transform ignore patterns
### TypeScript
+
- Main config: `tsconfig.json` (development)
- Release config: `tsconfig.release.json` (for builds)
- Strict mode enabled with ES2022 target
### ESLint
+
- Config: `eslint.config.mjs`
- Uses Callstack config + TypeScript strict rules
- Custom rules for import sorting and test files
@@ -76,20 +84,23 @@ The library provides three query variants for each selector:
## Testing Patterns
### Component Testing
+
```jsx
import { render, screen, userEvent } from '@testing-library/react-native';
test('component behavior', async () => {
const user = userEvent.setup();
render();
-
+
await user.press(screen.getByRole('button'));
expect(screen.getByText('Expected text')).toBeOnTheScreen();
});
```
### Async Testing
+
Use `findBy*` queries or `waitFor` for async operations:
+
```jsx
const element = await screen.findByText('Async content');
await waitFor(() => expect(mockFn).toHaveBeenCalled());
@@ -105,6 +116,7 @@ await waitFor(() => expect(mockFn).toHaveBeenCalled());
## Build Process
The build creates:
+
- `build/` - Compiled JavaScript and TypeScript declarations
- `matchers.js` - Jest matchers for separate import
- `pure.js` - Pure version without auto-cleanup
@@ -122,4 +134,4 @@ The build creates:
- Uses `react-test-renderer` for component rendering
- Fake timers recommended for user events
- String validation available for text rendering checks
-- Supports both concurrent and legacy React rendering modes
\ No newline at end of file
+- Supports both concurrent and legacy React rendering modes
diff --git a/eslint.config.mjs b/eslint.config.mjs
index 37cf80238..c02a5a65b 100644
--- a/eslint.config.mjs
+++ b/eslint.config.mjs
@@ -50,10 +50,7 @@ export default [
'react-native-a11y/has-valid-accessibility-ignores-invert-colors': 'off',
'react-native-a11y/has-valid-accessibility-value': 'off',
'@typescript-eslint/no-explicit-any': 'off',
- 'jest/no-standalone-expect': [
- 'error',
- { additionalTestBlockFunctions: ['testGateReact19'] },
- ],
+ 'jest/no-standalone-expect': ['error', { additionalTestBlockFunctions: ['testGateReact19'] }],
},
},
];
diff --git a/examples/basic/jest.config.js b/examples/basic/jest.config.js
index 657d049c5..c2a0e0c54 100644
--- a/examples/basic/jest.config.js
+++ b/examples/basic/jest.config.js
@@ -1,8 +1,6 @@
module.exports = {
preset: 'react-native',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
- transformIgnorePatterns: [
- 'node_modules/(?!(jest-)?react-native|@react-native(-community)?)',
- ],
+ transformIgnorePatterns: ['node_modules/(?!(jest-)?react-native|@react-native(-community)?)'],
setupFilesAfterEnv: ['./jest-setup.ts'],
};
diff --git a/examples/cookbook/README.md b/examples/cookbook/README.md
index 0b87a8b02..15fbb622a 100644
--- a/examples/cookbook/README.md
+++ b/examples/cookbook/README.md
@@ -3,6 +3,7 @@
# React Native Testing Library Cookbook App
+
Welcome to the React Native Testing Library (RNTL) Cookbook! This app is designed to provide developers with a collection of best practices, ready-made recipes, and tips & tricks to help you effectively test your React Native applications. Whether you’re just starting out with testing or looking to deepen your skills, this cookbook offers something for everyone.
Each recipe described in the Cookbook should have a corresponding code example screen in this repo.
@@ -12,6 +13,7 @@ Since examples will showcase usage of different dependencies, the dependencies i
file will grow much larger that in a normal React Native. This is fine 🐶☕️🔥.
## Running the App
+
1. Clone the repo `git clone git@github.com:callstack/react-native-testing-library.git`
2. Go to the `examples/cookbook` directory `cd examples/cookbook`
3. Install dependencies `yarn`
@@ -19,12 +21,14 @@ file will grow much larger that in a normal React Native. This is fine 🐶☕
5. Run the app either on iOS or Android by clicking on `i` or `a` in the terminal.
## How to Contribute
+
We invite all developers, from beginners to experts, to contribute your own recipes! If you have a clever solution, best practice, or useful tip, we encourage you to:
1. Submit a Pull Request with your recipe.
2. Join the conversation on GitHub [here](https://github.com/callstack/react-native-testing-library/issues/1624) to discuss ideas, ask questions, or provide feedback.
## Screenshots From the App
+
| Home Screen | Phonebook with Net. Req. Example |
-|-------------------------------------------------------|-----------------------------------------------------------------|
+| ----------------------------------------------------- | --------------------------------------------------------------- |
|  |  |
diff --git a/examples/cookbook/app/network-requests/__tests__/test-utils.ts b/examples/cookbook/app/network-requests/__tests__/test-utils.ts
index c14edd6b5..44deef49e 100644
--- a/examples/cookbook/app/network-requests/__tests__/test-utils.ts
+++ b/examples/cookbook/app/network-requests/__tests__/test-utils.ts
@@ -1,6 +1,6 @@
import { User } from '../types';
-import {http, HttpResponse} from "msw";
-import {setupServer} from "msw/node";
+import { http, HttpResponse } from 'msw';
+import { setupServer } from 'msw/node';
// Define request handlers and response resolvers for random user API.
// By default, we always return the happy path response.
diff --git a/jest.config.js b/jest.config.js
index ae12db2ca..5fd8d8e81 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -9,9 +9,9 @@ module.exports = {
snapshotSerializers: ['@relmify/jest-serializer-strip-ansi/always'],
clearMocks: true,
collectCoverageFrom: [
- "src/**/*.{js,jsx,ts,tsx}",
- "!src/**/__tests__/**",
- "!src/**/*.test.js",
- "!src/test-utils/**", // Exclude setup files
+ 'src/**/*.{js,jsx,ts,tsx}',
+ '!src/**/__tests__/**',
+ '!src/**/*.test.js',
+ '!src/test-utils/**', // Exclude setup files
],
};
diff --git a/typings/index.flow.js b/typings/index.flow.js
index e801e9f23..ea383d071 100644
--- a/typings/index.flow.js
+++ b/typings/index.flow.js
@@ -55,10 +55,10 @@ declare type A11yRole =
declare type A11yState = {|
disabled?: boolean,
- selected ?: boolean,
- checked ?: boolean | 'mixed',
- busy ?: boolean,
- expanded ?: boolean,
+ selected?: boolean,
+ checked?: boolean | 'mixed',
+ busy?: boolean,
+ expanded?: boolean,
|};
declare type A11yValue = {
diff --git a/website/docs/12.x/cookbook/advanced/network-requests.md b/website/docs/12.x/cookbook/advanced/network-requests.md
index 08002ef92..31a31d6c4 100644
--- a/website/docs/12.x/cookbook/advanced/network-requests.md
+++ b/website/docs/12.x/cookbook/advanced/network-requests.md
@@ -334,7 +334,7 @@ describe('PhoneBook', () => {
});
});
-````
+```
## Global guarding against unwanted API requests
diff --git a/website/docs/12.x/cookbook/state-management/jotai.md b/website/docs/12.x/cookbook/state-management/jotai.md
index 8471367c0..0e0c72e88 100644
--- a/website/docs/12.x/cookbook/state-management/jotai.md
+++ b/website/docs/12.x/cookbook/state-management/jotai.md
@@ -110,10 +110,10 @@ export interface RenderWithAtomsOptions {
*/
export const renderWithAtoms = (
component: React.ReactElement,
- options: RenderWithAtomsOptions,
+ options: RenderWithAtomsOptions
) => {
return render(
- {component},
+ {component}
);
};
diff --git a/website/docs/12.x/docs/api/queries.mdx b/website/docs/12.x/docs/api/queries.mdx
index 232ffab5f..e7034c683 100644
--- a/website/docs/12.x/docs/api/queries.mdx
+++ b/website/docs/12.x/docs/api/queries.mdx
@@ -195,32 +195,26 @@ const element3 = screen.getByRole('button', { name: 'Hello', disabled: true });
- `name`: Finds an element with given `role`/`accessibilityRole` and an accessible name (= accessability label or text content).
- `disabled`: You can filter elements by their disabled state (coming either from `aria-disabled` prop or `accessbilityState.disabled` prop). The possible values are `true` or `false`. Querying `disabled: false` will also match elements with `disabled: undefined` (see the [wiki](https://github.com/callstack/react-native-testing-library/wiki/Accessibility:-State) for more details).
-
- See [React Native's accessibilityState](https://reactnative.dev/docs/accessibility#accessibilitystate) docs to learn more about the `disabled` state.
- This option can alternatively be expressed using the [`toBeEnabled()` / `toBeDisabled()`](docs/api/jest-matchers#tobeenabled) Jest matchers.
- `selected`: You can filter elements by their selected state (coming either from `aria-selected` prop or `accessbilityState.selected` prop). The possible values are `true` or `false`. Querying `selected: false` will also match elements with `selected: undefined` (see the [wiki](https://github.com/callstack/react-native-testing-library/wiki/Accessibility:-State) for more details).
-
- See [React Native's accessibilityState](https://reactnative.dev/docs/accessibility#accessibilitystate) docs to learn more about the `selected` state.
- This option can alternatively be expressed using the [`toBeSelected()`](docs/api/jest-matchers#tobeselected) Jest matcher.
* `checked`: You can filter elements by their checked state (coming either from `aria-checked` prop or `accessbilityState.checked` prop). The possible values are `true`, `false`, or `"mixed"`.
-
- See [React Native's accessibilityState](https://reactnative.dev/docs/accessibility#accessibilitystate) docs to learn more about the `checked` state.
- This option can alternatively be expressed using the [`toBeChecked()` / `toBePartiallyChecked()`](docs/api/jest-matchers#tobechecked) Jest matchers.
* `busy`: You can filter elements by their busy state (coming either from `aria-busy` prop or `accessbilityState.busy` prop). The possible values are `true` or `false`. Querying `busy: false` will also match elements with `busy: undefined` (see the [wiki](https://github.com/callstack/react-native-testing-library/wiki/Accessibility:-State) for more details).
-
- See [React Native's accessibilityState](https://reactnative.dev/docs/accessibility#accessibilitystate) docs to learn more about the `busy` state.
- This option can alternatively be expressed using the [`toBeBusy()`](docs/api/jest-matchers#tobebusy) Jest matcher.
* `expanded`: You can filter elements by their expanded state (coming either from `aria-expanded` prop or `accessbilityState.expanded` prop). The possible values are `true` or `false`.
-
- See [React Native's accessibilityState](https://reactnative.dev/docs/accessibility#accessibilitystate) docs to learn more about the `expanded` state.
- This option can alternatively be expressed using the [`toBeExpanded()` / `toBeCollapsed()`](docs/api/jest-matchers#tobeexpanded) Jest matchers.
* `value`: Filter elements by their accessibility value, based on either `aria-valuemin`, `aria-valuemax`, `aria-valuenow`, `aria-valuetext` or `accessibilityValue` props. Accessiblity value conceptually consists of numeric `min`, `max` and `now` entries, as well as string `text` entry.
-
- See React Native [accessibilityValue](https://reactnative.dev/docs/accessibility#accessibilityvalue) docs to learn more about the accessibility value concept.
- This option can alternatively be expressed using the [`toHaveAccessibilityValue()`](docs/api/jest-matchers#tohaveaccessibilityvalue) Jest matcher.
diff --git a/website/docs/13.x/cookbook/advanced/network-requests.md b/website/docs/13.x/cookbook/advanced/network-requests.md
index 08002ef92..31a31d6c4 100644
--- a/website/docs/13.x/cookbook/advanced/network-requests.md
+++ b/website/docs/13.x/cookbook/advanced/network-requests.md
@@ -334,7 +334,7 @@ describe('PhoneBook', () => {
});
});
-````
+```
## Global guarding against unwanted API requests
diff --git a/website/docs/13.x/cookbook/state-management/jotai.md b/website/docs/13.x/cookbook/state-management/jotai.md
index 8471367c0..0e0c72e88 100644
--- a/website/docs/13.x/cookbook/state-management/jotai.md
+++ b/website/docs/13.x/cookbook/state-management/jotai.md
@@ -110,10 +110,10 @@ export interface RenderWithAtomsOptions {
*/
export const renderWithAtoms = (
component: React.ReactElement,
- options: RenderWithAtomsOptions,
+ options: RenderWithAtomsOptions
) => {
return render(
- {component},
+ {component}
);
};
diff --git a/website/docs/13.x/docs/api/events/fire-event.mdx b/website/docs/13.x/docs/api/events/fire-event.mdx
index 65af25fbb..b91b73533 100644
--- a/website/docs/13.x/docs/api/events/fire-event.mdx
+++ b/website/docs/13.x/docs/api/events/fire-event.mdx
@@ -193,7 +193,7 @@ import { renderAsync, screen, fireEventAsync } from '@testing-library/react-nati
test('fire event test', async () => {
await renderAsync();
-
+
await fireEventAsync(screen.getByText('Button'), 'press');
expect(screen.getByText('Action completed')).toBeOnTheScreen();
});
diff --git a/website/docs/13.x/docs/api/queries.mdx b/website/docs/13.x/docs/api/queries.mdx
index 232ffab5f..e7034c683 100644
--- a/website/docs/13.x/docs/api/queries.mdx
+++ b/website/docs/13.x/docs/api/queries.mdx
@@ -195,32 +195,26 @@ const element3 = screen.getByRole('button', { name: 'Hello', disabled: true });
- `name`: Finds an element with given `role`/`accessibilityRole` and an accessible name (= accessability label or text content).
- `disabled`: You can filter elements by their disabled state (coming either from `aria-disabled` prop or `accessbilityState.disabled` prop). The possible values are `true` or `false`. Querying `disabled: false` will also match elements with `disabled: undefined` (see the [wiki](https://github.com/callstack/react-native-testing-library/wiki/Accessibility:-State) for more details).
-
- See [React Native's accessibilityState](https://reactnative.dev/docs/accessibility#accessibilitystate) docs to learn more about the `disabled` state.
- This option can alternatively be expressed using the [`toBeEnabled()` / `toBeDisabled()`](docs/api/jest-matchers#tobeenabled) Jest matchers.
- `selected`: You can filter elements by their selected state (coming either from `aria-selected` prop or `accessbilityState.selected` prop). The possible values are `true` or `false`. Querying `selected: false` will also match elements with `selected: undefined` (see the [wiki](https://github.com/callstack/react-native-testing-library/wiki/Accessibility:-State) for more details).
-
- See [React Native's accessibilityState](https://reactnative.dev/docs/accessibility#accessibilitystate) docs to learn more about the `selected` state.
- This option can alternatively be expressed using the [`toBeSelected()`](docs/api/jest-matchers#tobeselected) Jest matcher.
* `checked`: You can filter elements by their checked state (coming either from `aria-checked` prop or `accessbilityState.checked` prop). The possible values are `true`, `false`, or `"mixed"`.
-
- See [React Native's accessibilityState](https://reactnative.dev/docs/accessibility#accessibilitystate) docs to learn more about the `checked` state.
- This option can alternatively be expressed using the [`toBeChecked()` / `toBePartiallyChecked()`](docs/api/jest-matchers#tobechecked) Jest matchers.
* `busy`: You can filter elements by their busy state (coming either from `aria-busy` prop or `accessbilityState.busy` prop). The possible values are `true` or `false`. Querying `busy: false` will also match elements with `busy: undefined` (see the [wiki](https://github.com/callstack/react-native-testing-library/wiki/Accessibility:-State) for more details).
-
- See [React Native's accessibilityState](https://reactnative.dev/docs/accessibility#accessibilitystate) docs to learn more about the `busy` state.
- This option can alternatively be expressed using the [`toBeBusy()`](docs/api/jest-matchers#tobebusy) Jest matcher.
* `expanded`: You can filter elements by their expanded state (coming either from `aria-expanded` prop or `accessbilityState.expanded` prop). The possible values are `true` or `false`.
-
- See [React Native's accessibilityState](https://reactnative.dev/docs/accessibility#accessibilitystate) docs to learn more about the `expanded` state.
- This option can alternatively be expressed using the [`toBeExpanded()` / `toBeCollapsed()`](docs/api/jest-matchers#tobeexpanded) Jest matchers.
* `value`: Filter elements by their accessibility value, based on either `aria-valuemin`, `aria-valuemax`, `aria-valuenow`, `aria-valuetext` or `accessibilityValue` props. Accessiblity value conceptually consists of numeric `min`, `max` and `now` entries, as well as string `text` entry.
-
- See React Native [accessibilityValue](https://reactnative.dev/docs/accessibility#accessibilityvalue) docs to learn more about the accessibility value concept.
- This option can alternatively be expressed using the [`toHaveAccessibilityValue()`](docs/api/jest-matchers#tohaveaccessibilityvalue) Jest matcher.
diff --git a/website/docs/13.x/docs/guides/react-19.mdx b/website/docs/13.x/docs/guides/react-19.mdx
index 6a98a8609..17ba65b97 100644
--- a/website/docs/13.x/docs/guides/react-19.mdx
+++ b/website/docs/13.x/docs/guides/react-19.mdx
@@ -9,11 +9,13 @@ When testing components that use these features, React requires the [`async act`
RNTL 13.3 introduces async versions of the core testing APIs to handle React 19's async rendering:
**Rendering APIs:**
+
- **[`renderAsync`](docs/api/render#render-async)** - async version of `render`
- **[`screen.rerenderAsync`](docs/api/screen#rerender-async)** - async version of `screen.rerender`
- **[`screen.unmountAsync`](docs/api/screen#unmount-async)** - async version of `screen.unmount`
**Event APIs:**
+
- **[`fireEventAsync`](docs/api/events/fire-event#fire-event-async)** - async version of `fireEvent`
## APIs that remain unchanged
@@ -29,6 +31,7 @@ Many existing APIs continue to work without modification:
### Making tests async
The main change is using [`renderAsync`](docs/api/render#renderasync) instead of `render`, which requires:
+
1. Making your test function `async`
2. Adding `await` before `renderAsync`
@@ -49,6 +52,7 @@ test('my component', async () => {
### When to use async APIs
Use the async APIs when your components:
+
- Use React Suspense for data fetching or code splitting
- Call `React.use()` for reading promises or context
- Have async state updates that need proper `act()` handling
@@ -56,13 +60,17 @@ Use the async APIs when your components:
## Migration strategy
### New projects
+
Use the async-ready APIs (`renderAsync`, User Event, Jest Matchers, etc.) from the start. They work with both React 18 and React 19.
### Existing projects
+
You can migrate gradually:
+
- **Existing tests** continue to work with synchronous APIs (`render`, etc.)
- **New tests** should use async APIs
- **Tests with Suspense/`React.use()`** must use async APIs
### Future direction
+
Async APIs will become the default recommendation as React 19 adoption grows. Starting with them now saves migration effort later.
From cfb331507b8c376b6db78a4f6148c64e2e31bbd0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?=
Date: Thu, 28 Aug 2025 09:12:05 +0200
Subject: [PATCH 2/4] .
---
.github/workflows/ci.yml | 2 +-
package.json | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 0a9a08f26..293fc97a4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -28,7 +28,7 @@ jobs:
run: yarn lint
- name: Prettier
- run: yarn prettier --check .
+ run: yarn prettier
typecheck:
runs-on: ubuntu-latest
diff --git a/package.json b/package.json
index 6e345aff2..cd7c38f84 100644
--- a/package.json
+++ b/package.json
@@ -35,7 +35,9 @@
"build:ts": "tsc --build tsconfig.release.json",
"build": "yarn clean && yarn build:js && yarn build:ts && yarn copy-flowtypes",
"release": "release-it",
- "release:rc": "release-it --preRelease=rc"
+ "release:rc": "release-it --preRelease=rc",
+ "prettier": "prettier --check .",
+ "prettier:write": "prettier --write ."
},
"files": [
"build/",
From 861a439c04a881be49e9963949040f85347672ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?=
Date: Thu, 28 Aug 2025 09:13:27 +0200
Subject: [PATCH 3/4] .
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index cd7c38f84..0274d2e33 100644
--- a/package.json
+++ b/package.json
@@ -30,7 +30,7 @@
"typecheck": "tsc",
"copy-flowtypes": "cp typings/index.flow.js build",
"lint": "eslint src --cache",
- "validate": "yarn lint && yarn typecheck && yarn test",
+ "validate": "yarn prettier && yarn lint && yarn typecheck && yarn test",
"build:js": "babel src --out-dir build --extensions \".js,.ts,.jsx,.tsx\" --source-maps --ignore \"**/__tests__/**\"",
"build:ts": "tsc --build tsconfig.release.json",
"build": "yarn clean && yarn build:js && yarn build:ts && yarn copy-flowtypes",
From da5440ae118517489acc24588d8684ea5bf903fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Maciej=20Jastrze=CC=A8bski?=
Date: Thu, 28 Aug 2025 09:13:59 +0200
Subject: [PATCH 4/4] .
---
.prettierignore | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.prettierignore b/.prettierignore
index d0168acd4..26e25e83b 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -1,4 +1,4 @@
node_modules/
.yarn
-flow-typed/
\ No newline at end of file
+flow-typed/