Add open-in-figma extension#27265
Conversation
|
Congratulations on your new Raycast extension! 🚀 We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days. Once the PR is approved and merged, the extension will be available on our Store. |
Greptile SummaryThis PR adds a new
Confidence Score: 4/5Two P1 issues should be resolved before merging: the inverted The inverted boolean predicate creates a latent correctness risk (currently masked by the call-site), and the unused dependency violates the project's explicit rule. Both are straightforward to fix.
Important Files Changed
Prompt To Fix All With AIThis is a comment left during a code review.
Path: extensions/open-in-figma/src/open-in-figma.ts
Line: 14-17
Comment:
**Inverted function name — `isFigmaInstalled` returns `true` when Figma is absent**
The function is named `isFigmaInstalled` but `findIndex(...) === -1` evaluates to `true` only when no match is found (i.e. Figma is **not** installed). The call-site `if (await isFigmaInstalled())` then correctly shows the "not installed" HUD, so the end behaviour is accidentally correct — but the name is the opposite of what the implementation computes. A future maintainer changing `!isFigmaInstalled()` anywhere would introduce a real bug.
```suggestion
const isFigmaInstalled = async () => {
const installedApps = await getApplications();
return installedApps.some((app) => app.name === "Figma");
};
```
And update the call-site:
```typescript
if (!(await isFigmaInstalled())) {
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: extensions/open-in-figma/package.json
Line: 27-29
Comment:
**`@raycast/utils` declared as a dependency but never imported**
`@raycast/utils` appears in `dependencies` but is not imported anywhere in `src/open-in-figma.ts`. Unused dependencies bloat the bundle and installation time with no benefit.
```suggestion
"dependencies": {
"@raycast/api": "^1.104.12"
},
```
**Rule Used:** What: Every dependency listed in package.json must... ([source](https://app.greptile.com/review/custom-context?memory=bffc60eb-f9f2-4219-b804-76e29e267d43))
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "Added check to find if Figma is installe..." | Re-trigger Greptile |
|
This pull request has been automatically marked as stale because it did not have any recent activity. It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊 |
|
This pull request has been automatically closed due to inactivity. Feel free to comment in the thread when you're ready to continue working on it 🙂 You can also catch us in Slack if you want to discuss this. |
Description
Open in Figma - Open Figma URL in clipboard with Figma app
Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder