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
- typescript-standards: Add generic-component-fc-exception pattern,
update no-deprecated NavigationBase pointer to /fix-eslint skill
- im/SKILL.md: Document update-eslint-warnings.ts graduation mechanism
- fix-eslint/SKILL.md: Updated navigation-base pattern (from prior session)
TODO: lint-warnings.sh only reads patterns from typescript-standards.mdc.
It should also load patterns from /fix-eslint SKILL.md (or a shared
patterns file) so detailed fix guidance is front-loaded in terminal output.
<pattern id="generic-component-fc-exception" rule="edge/react-fc-component-definition">Generic components cannot use `React.FC` because it does not support type parameters.
207
+
If the generic is not essential (type param only used internally, can be collapsed into a concrete type), remove the generic and convert to `React.FC<Props>`.
208
+
If the generic is essential (callers rely on type inference, e.g. `<EdgeCarousel<MyItem> ...>`), keep the function declaration form with an explicit return type. The warning is accepted.
209
+
✅ `export function MyComponent<T>(props: Props<T>): React.ReactElement {`
210
+
❌ Converting an essential generic to `React.FC` — this loses type safety for callers.
Copy file name to clipboardExpand all lines: .cursor/skills/chat-audit/SKILL.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ metadata:
6
6
author: j0ntz
7
7
---
8
8
9
-
<goal>Analyze a Cursor chat export to identify inefficiencies, rule violations, and wasted tool calls against the invoked command's workflow.</goal>
9
+
<goal>Analyze current chat or provided Cursor chat export to identify inefficiencies, rule violations, and wasted tool calls against the invoked command's workflow.</goal>
10
10
11
11
<rulesdescription="Non-negotiable constraints.">
12
12
<ruleid="use-companion-script">Use `scripts/cursor-chat-extract.js` to parse the export. Do NOT parse the raw JSON inline — it is deeply nested and will consume excessive context.</rule>
Copy file name to clipboardExpand all lines: .cursor/skills/fix-eslint/SKILL.md
+59-20Lines changed: 59 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,42 +7,81 @@ description: Fix ESLint warnings by applying documented patterns. Use when addre
7
7
8
8
<rulesdescription="Non-negotiable constraints.">
9
9
<ruleid="tsc-after-fix">Run `npx tsc --noEmit` after every type change to verify no new type errors are introduced.</rule>
10
-
<ruleid="no-suppress">Do not suppress deprecation warnings with `eslint-disable` comments. Fix the underlying type reference.</rule>
10
+
<ruleid="no-suppress">Do not suppress deprecation warnings with `eslint-disable` comments. Fix the underlying type reference.
11
+
Exception: `NavigationBase` deprecation in shared cross-navigator code (Categories C, D, F below) is accepted — not suppressed, genuinely not fixable without a broader v7 navigation migration. When the fix scope is too broad, add a TODO comment documenting the required migration pattern and accept the warning.</rule>
11
12
<ruleid="scope-control">Only modify files with deprecation warnings. Do not refactor downstream declarations unless required for the fix to compile.</rule>
`NavigationBase` is a flat navigation type that predates react-navigation's composite `XyzSceneProps` types. It cannot be replaced with scene-specific types in shared code due to variance constraints in composite navigation props.
18
+
`NavigationBase` is a flat navigation type hack in `routerTypes.tsx`that unions all navigator param lists (`RootParamList & DrawerParamList & EdgeAppStackParamList & ...`) to pretend the app is flat. It is deprecated because it tracks **react-navigation v7 breaking changes**:
18
19
19
-
**In scene components** (call sites):
20
-
Replace `navigation as NavigationBase` casts with `navigation as AppNavigation`:
20
+
1.`navigate()` no longer crosses nested navigator boundaries at runtime.
21
+
2.`navigate()` no longer goes back to an existing screen to update params — use `popTo()` or `navigate(screen, params, { pop: true })` instead.
21
22
23
+
v7 provides `navigateDeprecated()` and `navigationInChildEnabled` as temporary bridges, both removed in v8. **Do NOT create non-deprecated aliases** (like `AppNavigation`) — this hides a real migration requirement.
24
+
25
+
Fix `NavigationBase` deprecation by identifying which category the usage falls into:
26
+
27
+
**Category A — Pass-through props** (component accepts `NavigationBase` only to forward it to children or actions):
28
+
- Fix: Remove the `navigation` prop. Callers already have navigation in scope. If the child needs navigation, it should use `useNavigation()` or accept specific callbacks.
Replace `NavigationBase` parameter types with `AppNavigation`:
34
-
37
+
**Category B — Direct navigation in non-scene components** (component accepts `NavigationBase`, calls `navigate()`/`push()` directly):
38
+
- Fix: Replace `navigation: NavigationBase` prop with `useNavigation()` hook typed to the navigator context the component lives in. Or replace with specific navigation callbacks from the parent scene.
- If the fix would cascade to many callers or require determining the correct navigator context across multiple usages, add a `// TODO: Replace NavigationBase with useNavigation() or callbacks. Requires v7 navigation migration.` comment and move on.
function activateWalletTokens(wallet, tokenIds, onNavigate: (route:string, params:object) =>void):ThunkAction<Promise<void>> {
67
+
// ... calls onNavigate('editToken', ...) instead
68
+
}
43
69
```
70
+
- Simpler alternative for single-navigate functions: Return the target route + params instead of navigating; let the caller dispatch.
71
+
- If the function has many navigate calls to different screens or the refactoring would touch many callers, add a `// TODO: Remove NavigationBase dependency. Requires inversion of navigation control for v7 migration.` comment and move on.
72
+
73
+
**Category D — Shared modal components** (modals accept `NavigationBase`, navigate after user interaction):
74
+
- Fix: Modal returns a result via Airship bridge resolve; caller handles navigation based on the result. Or modal accepts navigation callbacks.
75
+
- If the modal's navigation logic is complex (multiple paths), add a comment and move on.
76
+
77
+
**Category E — Scene component casts** (`navigation as NavigationBase`):
78
+
- These casts exist because the scene passes navigation to a Category A-D consumer.
79
+
- Fix: No direct fix needed — casts disappear automatically when the consumer is migrated.
80
+
- If the scene has its own `NavigationBase` usage unrelated to shared code, apply Category B fix.
44
81
45
-
**Why `as` casts are still required**: Composite scene navigation types (e.g. `WalletsTabSceneProps<'transactionList'>['navigation']`) are not structurally assignable to flat navigation types due to `PrivateValueStore` phantom types and contravariance in `dispatch`. The cast is the intended escape hatch.
82
+
**Category F — Service components** (non-scene services: `DeepLinkingManager`, `AccountCallbackManager`, etc.):
83
+
- These are the broadest migration cases. Always add: `// TODO: Remove NavigationBase dependency. Requires broader v7 navigation migration for service-level navigation.`
84
+
- Do not attempt to fix these incrementally — they are cross-cutting and require dedicated migration work.
Copy file name to clipboardExpand all lines: .cursor/skills/im/SKILL.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,8 @@ If the script auto-fixes files or remaining findings exist:
81
81
`lint-commit.sh` treats passed file arguments as the primary commit scope, auto-includes generated companion files like `src/locales/strings`, `eslint.config.mjs`, and snapshots, and reports any additional non-generated files it stages.
82
82
83
83
This ensures the subsequent feature commit introduces zero pre-existing lint findings. This is the initial pass — if you discover additional files to modify during Step 3, the same check applies (see Step 3).
84
+
85
+
**Warning graduation (edge-react-gui)**: `edge-react-gui` has a suppression list in `eslint.config.mjs` that turns `explicit-function-return-type`, `strict-boolean-expressions`, `use-unknown-in-catch-callback-variable`, and `ban-ts-comment` to warning severity for ~300+ files. When `lint-commit.sh` commits a file, `update-eslint-warnings.ts` removes it from this list — "graduating" the file to full error enforcement. If a graduated file has pre-existing violations on lines you touched, `lint-commit.sh` Step 2b will block the commit. Running `lint-warnings.sh` here in Step 2 catches and fixes these issues before graduation occurs.
0 commit comments