You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Validate TypeScript and JavaScript changes in React Native Firebase by running the root prepare, TypeScript compile, API reference, Jest, formatting, and compare-types scripts. Use when a developer updates TS/JS code and wants the standard RNFB validation pass before handing off or committing.
3
+
description: Validate React Native Firebase changes by running the CI-equivalent prepare, TypeScript, lint, Jest, formatting, and compare-types scripts. Use before handoff, commit, or push when package sources, native bridge code, or docs changed.
Use this skill to validate changes to TypeScript or JavaScript code in the React Native Firebase monorepo.
17
+
Use this skill to validate changes in the React Native Firebase monorepo before handoff, commit, or push.
18
18
19
-
It is for developer-facing validation after editing package JS/TS sources, type tests, Jest tests, or shared TypeScript configuration. It runs the standard root validation commands that catch generated package setup issues, TypeScript errors, consumer type regressions, API reference regressions, Jest failures, formatting drift, and firebase-js-sdk type parity drift.
19
+
It runs the same static-analysis and compile/test commands CI uses for the Lint, TypeScript, Jest, docs, and compare-types jobs — not a narrowed JS-only subset.
20
20
21
21
## Triggers
22
22
23
23
Use this skill when the user asks for:
24
24
25
25
- testing TS or JS changes
26
26
- validating TypeScript or JavaScript edits before commit or handoff
27
-
- running the standard JS validation pass for RNFB
28
-
- checking whether package JS/TS changes compile and pass Jest
29
-
- formatting package JS/TS code and then running validation
27
+
- running the standard validation pass for RNFB
28
+
- checking whether package changes compile and pass Jest
29
+
- formatting and linting before push
30
+
- CI-equivalent validation before publication
30
31
31
32
## Out-of-scope boundaries
32
33
33
34
Do not use this skill for:
34
35
35
-
- Android Java/Kotlin formatting or build validation
36
-
- iOS Objective-C, Objective-C++, C++, Swift, or pod validation
37
-
- documentation-only changes that do not affect JS/TS behavior
38
-
- release validation that requires the full platform, emulator, Detox, or packaging matrix
36
+
- release validation that requires the full platform, emulator, Detox, or packaging matrix (see [validation checklist § e2e](../../../okf-bundle/testing/validation-checklist.md))
39
37
- migrating a package from JavaScript to TypeScript; use the TypeScript refactor or migration skills instead
40
38
41
39
## Defaults
42
40
43
-
Set one clear default path so the agent does not choose randomly between options.
44
-
45
41
- Default tool or method: run the canonical command sequence below from the repository root
46
-
- Fallback when default fails: if a command fails, stop the sequence, inspect the failure, fix issues only when the user asked for fixes or the fix is clearly in the current change set, then rerun the failed command and any later commands
47
-
- Why this default exists: `lerna:prepare`, both TypeScript compiles, API reference generation, Jest, formatting, and compare-types cover the JS/TS surfaces most likely to regress in this monorepo
42
+
- Fallback when default fails: stop, inspect the failure, fix issues in the current change set when authorized, then rerun the failed command and any later commands
43
+
- Why this default exists: the sequence mirrors CI Lint + TypeScript + Jest + docs + compare-types gates
48
44
49
45
## Command sequence
50
46
@@ -54,43 +50,42 @@ Run these root `package.json` scripts in order. **Canonical checklist:** [valida
54
50
2.`yarn tsc:compile`
55
51
3.`yarn tsc:compile:consumer`
56
52
4.`yarn reference:api`
57
-
5.`yarn lint:js` (use `yarn lint:js --fix` then re-run until clean)
58
-
6.`yarn tests:jest`
59
-
7.`yarn format:js`
60
-
8.`yarn compare:types`
53
+
5.`yarn lint` — **CI Lint job** (`lint:js` + `lint:android` + `lint:ios:check`). When `lint:android` reformats Java, commit the formatter output and rerun until exit 0.
54
+
6. When `docs/**` changed: `yarn lint:markdown` then `yarn lint:spellcheck` — **CI docs job**
55
+
7.`yarn lint:js --fix` then `yarn lint:js` when step 5 reported ESLint issues only (optional shortcut before re-running full `yarn lint`)
-**Forbidden:**`yarn workspace … prepare`, `cd packages/<pkg> && yarn prepare/build`, `yarn jet`, `npx jet` — see [agent command policy](../../../okf-bundle/testing/agent-command-policy.md). On failure, fix product code and re-run the **same** canonical command.
63
+
-**`yarn lint` is not optional** when native Java or iOS sources are in the diff — `lint:js` alone does not match CI.
64
+
-**`yarn lint:spellcheck` is not optional** when `docs/**` is in the diff — `lint:markdown` alone does not match CI.
65
65
-`yarn format:js` writes changes across `packages/**/*.{js,ts,tsx}`. Check the diff after formatting and do not revert user changes.
66
66
- Run commands from the repository root so workspace resolution, root `tsconfig.json`, and Jest configuration are consistent.
67
67
-`yarn lerna:prepare` may rebuild or refresh package artifacts needed before TypeScript or tests run.
68
-
-`yarn tsc:compile` checks the repository TypeScript project, while `yarn tsc:compile:consumer` checks the consumer-facing TypeScript project. Run both.
69
-
-`yarn reference:api` runs TypeDoc and should come after consumer TypeScript compilation.
70
-
-`yarn tests:jest` is the root Jest entrypoint. If it fails, report the failing test file or suite and the first actionable error rather than dumping the full output.
71
68
-`yarn compare:types` installs dependencies under `.github/scripts/compare-types` before running the type parity comparison. Keep it last.
72
-
- If validation is slow, keep the command running rather than replacing it with a narrower command unless the user explicitly asks for targeted validation.
69
+
- If validation is slow, keep the command running rather than replacing it with a narrower command unless the user explicitly narrows validation.
73
70
74
71
## Workflow
75
72
76
-
1. Confirm the task is TS/JS validation and note any specific changed package or test files the user mentioned.
73
+
1. Confirm the task scope and note changed packages, native paths, or docs.
77
74
2. Check whether the worktree has unrelated dirty files if the current task includes code edits or commit preparation.
78
75
3. Run the command sequence from the repository root.
79
-
4. If `yarn format:js` changes files, include those formatting changes in the validation context and inspect the relevant diff before continuing.
76
+
4. If `yarn lint:android` or `yarn format:js` changes files, include those changes and rerun `yarn lint` before continuing.
80
77
5. If a command fails:
81
78
- stop before running later commands
82
-
- identify whether the failure belongs to the current TS/JS changes, pre-existing repo state, or missing local setup
79
+
- identify whether the failure belongs to the current changes, pre-existing repo state, or missing local setup
83
80
- fix current-change failures when authorized, then rerun the failed command and continue the remaining sequence
84
81
6. Return a concise result with the commands run, pass/fail status, and any remaining blockers.
85
82
86
83
## Validation loop
87
84
88
-
Use this loop before finalizing:
89
-
90
85
1. Run the command sequence.
91
-
2. If validation fails because of current TS/JS changes and fixing is in scope, fix the issue and rerun the failed command plus all later commands.
86
+
2. If validation fails because of current changes and fixing is in scope, fix the issue and rerun the failed command plus all later commands.
92
87
3. If validation fails for unrelated or environment-specific reasons, stop and report the blocker with the command that failed and the shortest useful error summary.
93
-
4. Only report success when every command in the sequence completes successfully.
88
+
4. Only report success when every applicable command in the sequence completes successfully.
94
89
95
90
## Output format
96
91
@@ -108,7 +103,9 @@ Use this template:
108
103
-`yarn tsc:compile`: passed | failed | not run
109
104
-`yarn tsc:compile:consumer`: passed | failed | not run
110
105
-`yarn reference:api`: passed | failed | not run
111
-
-`yarn lint:js`: passed | failed | not run
106
+
-`yarn lint`: passed | failed | not run
107
+
-`yarn lint:markdown`: passed | failed | not run | n/a
108
+
-`yarn lint:spellcheck`: passed | failed | not run | n/a
0 commit comments