verify
Pre-commit validation for React contributions with parallel type checking and testing.
- Runs formatting and linting sequentially, stopping on first failure to catch issues early
- Executes type checking and dual test suites (source and www) in parallel using subagents for efficiency
- Accepts optional test pattern argument to filter which tests run
- Provides detailed failure reporting with suggested fixes when any step fails
Verification
Run all verification steps.
Arguments:
- $ARGUMENTS: Test pattern for the test step
Instructions
Run these first in sequence:
- Run
yarn prettier- format code (stop if fails) - Run
yarn linc- lint changed files (stop if fails)
Then run these with subagents in parallel:
- Use
/flowto type check (stop if fails) - Use
/testto test changes in source (stop if fails) - Use
/test wwwto test changes in www (stop if fails)
If all pass, show success summary. On failure, stop immediately and report the issue with suggested fixes.
More from facebook/react
fix
Use when you have lint errors, formatting issues, or before committing code to ensure it passes CI.
1.7Kextract-errors
Use when adding new error messages to React, or seeing "unknown error code" warnings.
958test
Use when you need to run tests for React core. Supports source, www, stable, and experimental channels.
883feature-flags
Use when feature flag tests fail, flags need updating, understanding @gate pragmas, debugging channel-specific test failures, or adding new flags to React.
846flow
Use when you need to run Flow type checking, or when seeing Flow type errors in React code.
826flags
Use when you need to check feature flag states, compare channels, or debug why a feature behaves differently across release channels.
783