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: 3/5
Important Files Changed
Prompt To Fix All With AIThis is a comment left during a code review.
Path: extensions/markdown-to-pdf/src/lib/normalization.ts
Line: 4-14
Comment:
**`OutputFormat` type not imported**
`OutputFormat` is used as a type annotation in the function signature but is never imported from `./types`. This will cause a TypeScript compilation error.
Add `type OutputFormat` to the import block at the top of the file:
```suggestion
import {
BUILTIN_THEME_NAMES,
BUILTIN_THEMES,
type BuiltinThemeName,
FONT_CHOICES,
type ConvertContentInput,
type DocumentLayoutOptions,
type FontChoice,
type NumericInput,
type OutputFormat,
type ThemePalette,
} from "./types";
```
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/markdown-to-pdf/src/lib/normalization.ts
Line: 104-113
Comment:
**Manual `getPreferenceValues` type annotation**
`getPreferenceValues` is being called with a manually written inline type. Per Raycast extension conventions, the `Preferences` type is auto-generated in `raycast-env.d.ts` when the extension runs, so the explicit type parameter should be removed in favour of `getPreferenceValues<Preferences>()`. Manual type definitions can drift out of sync with the actual preference schema in `package.json` and cause type mismatches at runtime.
The `require()` workaround for test isolation is also non-standard; a conventional top-level `import` should be used instead, and tests that need to avoid the Raycast runtime can mock the module.
**Rule Used:** What: Don't manually define `Preferences` for `get... ([source](https://app.greptile.com/review/custom-context?memory=d93fc9fb-a45d-4479-a6a4-b1b4af98ebc8))
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/markdown-to-pdf/CHANGELOG.md
Line: 3
Comment:
**Hardcoded date instead of `{PR_MERGE_DATE}` placeholder**
The changelog date should use the `{PR_MERGE_DATE}` template placeholder so the merge date is automatically populated when the PR is merged, rather than a manually set date.
```suggestion
## [Initial Release] - {PR_MERGE_DATE}
```
**Rule Used:** What: Changelog entries must use `{PR_MERGE_DATE}`... ([source](https://app.greptile.com/review/custom-context?memory=c2214c11-df56-490a-b1c0-09a385df481a))
How can I resolve this? If you propose a fix, please make it concise.Last reviewed commit: "Fix TypeScript stric..." |
| import { | ||
| BUILTIN_THEME_NAMES, | ||
| BUILTIN_THEMES, | ||
| type BuiltinThemeName, | ||
| FONT_CHOICES, | ||
| type ConvertContentInput, | ||
| type DocumentLayoutOptions, | ||
| type FontChoice, | ||
| type NumericInput, | ||
| type OutputFormat, | ||
| type ThemePalette, |
There was a problem hiding this comment.
OutputFormat type not imported
OutputFormat is used as a type annotation in the function signature but is never imported from ./types. This will cause a TypeScript compilation error.
Add type OutputFormat to the import block at the top of the file:
| import { | |
| BUILTIN_THEME_NAMES, | |
| BUILTIN_THEMES, | |
| type BuiltinThemeName, | |
| FONT_CHOICES, | |
| type ConvertContentInput, | |
| type DocumentLayoutOptions, | |
| type FontChoice, | |
| type NumericInput, | |
| type OutputFormat, | |
| type ThemePalette, | |
| import { | |
| BUILTIN_THEME_NAMES, | |
| BUILTIN_THEMES, | |
| type BuiltinThemeName, | |
| FONT_CHOICES, | |
| type ConvertContentInput, | |
| type DocumentLayoutOptions, | |
| type FontChoice, | |
| type NumericInput, | |
| type OutputFormat, | |
| type ThemePalette, | |
| } from "./types"; |
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/markdown-to-pdf/src/lib/normalization.ts
Line: 4-14
Comment:
**`OutputFormat` type not imported**
`OutputFormat` is used as a type annotation in the function signature but is never imported from `./types`. This will cause a TypeScript compilation error.
Add `type OutputFormat` to the import block at the top of the file:
```suggestion
import {
BUILTIN_THEME_NAMES,
BUILTIN_THEMES,
type BuiltinThemeName,
FONT_CHOICES,
type ConvertContentInput,
type DocumentLayoutOptions,
type FontChoice,
type NumericInput,
type OutputFormat,
type ThemePalette,
} from "./types";
```
How can I resolve this? If you propose a fix, please make it concise.| try { | ||
| // eslint-disable-next-line @typescript-eslint/no-require-imports | ||
| const api = require("@raycast/api") as { | ||
| getPreferenceValues: () => { | ||
| customThemeName?: string; | ||
| customAccentColor?: string; | ||
| customTextColor?: string; | ||
| customSurfaceColor?: string; | ||
| }; | ||
| }; |
There was a problem hiding this comment.
Manual
getPreferenceValues type annotation
getPreferenceValues is being called with a manually written inline type. Per Raycast extension conventions, the Preferences type is auto-generated in raycast-env.d.ts when the extension runs, so the explicit type parameter should be removed in favour of getPreferenceValues<Preferences>(). Manual type definitions can drift out of sync with the actual preference schema in package.json and cause type mismatches at runtime.
The require() workaround for test isolation is also non-standard; a conventional top-level import should be used instead, and tests that need to avoid the Raycast runtime can mock the module.
Rule Used: What: Don't manually define Preferences for `get... (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/markdown-to-pdf/src/lib/normalization.ts
Line: 104-113
Comment:
**Manual `getPreferenceValues` type annotation**
`getPreferenceValues` is being called with a manually written inline type. Per Raycast extension conventions, the `Preferences` type is auto-generated in `raycast-env.d.ts` when the extension runs, so the explicit type parameter should be removed in favour of `getPreferenceValues<Preferences>()`. Manual type definitions can drift out of sync with the actual preference schema in `package.json` and cause type mismatches at runtime.
The `require()` workaround for test isolation is also non-standard; a conventional top-level `import` should be used instead, and tests that need to avoid the Raycast runtime can mock the module.
**Rule Used:** What: Don't manually define `Preferences` for `get... ([source](https://app.greptile.com/review/custom-context?memory=d93fc9fb-a45d-4479-a6a4-b1b4af98ebc8))
How can I resolve this? If you propose a fix, please make it concise.| @@ -0,0 +1,9 @@ | |||
| # Changelog | |||
|
|
|||
| ## [Initial Release] - 2026-03-21 | |||
There was a problem hiding this comment.
Hardcoded date instead of
{PR_MERGE_DATE} placeholder
The changelog date should use the {PR_MERGE_DATE} template placeholder so the merge date is automatically populated when the PR is merged, rather than a manually set date.
| ## [Initial Release] - 2026-03-21 | |
| ## [Initial Release] - {PR_MERGE_DATE} |
Rule Used: What: Changelog entries must use {PR_MERGE_DATE}... (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/markdown-to-pdf/CHANGELOG.md
Line: 3
Comment:
**Hardcoded date instead of `{PR_MERGE_DATE}` placeholder**
The changelog date should use the `{PR_MERGE_DATE}` template placeholder so the merge date is automatically populated when the PR is merged, rather than a manually set date.
```suggestion
## [Initial Release] - {PR_MERGE_DATE}
```
**Rule Used:** What: Changelog entries must use `{PR_MERGE_DATE}`... ([source](https://app.greptile.com/review/custom-context?memory=c2214c11-df56-490a-b1c0-09a385df481a))
How can I resolve this? If you propose a fix, please make it concise.
Description
An AI-tool extension that converts markdown into styled PDFs. Mention @markdown to PDF in Ask AI, AI Chat, or AI Commands with your markdown content.
Features:
Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder