Skip to content

Commit 2b3e169

Browse files
committed
just fmt
1 parent 153256b commit 2b3e169

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

workflow.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,28 @@ nodes:
2323
steps:
2424
- name: "AI Code Review"
2525
ai:
26-
model: "gpt-4o-mini"
26+
model: "gpt-4o-mini"
2727
max_tokens: 8000
2828
prompt: |
2929
IMPORTANT: A codemod (`react-declassify`) has ALREADY attempted to transform React class components to function components in this repository.
3030
Most files are COMPLETE, but `react-declassify` has known limitations and leaves markers where it fails. Your job is to REVIEW, FIX, and FINISH the transformations.
31-
31+
3232
CRITICAL: You MUST provide verbose output explaining what you're doing at each step!
3333
Output your progress as you work so users can see what's happening.
34-
34+
3535
Step 1: Search for Hard Errors and Soft Errors
3636
- Search the project for `react-declassify-disable Cannot perform transformation`. This indicates a HARD ERROR where the tool gave up. You MUST manually convert this entire class to a function component with Hooks yourself!
3737
- Search the project for `TODO_this`. This indicates a SOFT ERROR where the tool didn't know how to bind or resolve `this`. Fix the scoping and state/prop references.
38-
38+
3939
Step 2: Address react-declassify's Known Limitations
4040
- Class Refs: If the old class was receiving refs or being instantiated via `useRef`, the new functional component will break. You MUST wrap the component in `React.forwardRef` and use `useImperativeHandle` to expose the necessary methods/properties!
4141
- Stricter Render Types: If the component returns a bare string/number and TypeScript complains about `FC<Props>`, wrap the return statement in a fragment `<> ... </>`.
42-
42+
4343
Step 3: Review common transformation issues
4444
- Fix missing or incorrect dependency arrays in useEffect hooks
4545
- Ensure all setState calls use the functional updater when depending on previous state
4646
- Add missing cleanup functions in useEffect where needed
47-
47+
4848
Step 4: ALWAYS output a clear summary
4949
You MUST provide a detailed summary at the end including:
5050
- Total files reviewed
@@ -60,12 +60,12 @@ nodes:
6060
==================
6161
Files reviewed: [actual number]
6262
Files modified: [actual number]
63-
63+
6464
Changes made:
6565
1. [ACTUAL FILE PATH]
6666
- [specific change]
6767
```
68-
68+
6969
**Efficient Review Strategy:**
7070
- Run: grep -r "TODO_this" --include="*.js" --include="*.jsx" --include="*.tsx" --include="*.ts" .
7171
- Run: grep -r "react-declassify-disable" --include="*.js" --include="*.jsx" --include="*.tsx" --include="*.ts" .

0 commit comments

Comments
 (0)