Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix import issues #225

Merged
merged 3 commits into from
Feb 12, 2024
Merged

Fix import issues #225

merged 3 commits into from
Feb 12, 2024

Conversation

chrismwilliams
Copy link
Owner

@chrismwilliams chrismwilliams commented Feb 12, 2024

What kind of changes does this PR include?

  • Updates pkg's
  • Fix ts imports/aliases, Astro imports now require the .astro extension
  • update eslint config and format files

Description

Copy link

netlify bot commented Feb 12, 2024

Deploy Preview for astro-theme-cactus ready!

Name Link
🔨 Latest commit 35f8adc
🔍 Latest deploy log https://app.netlify.com/sites/astro-theme-cactus/deploys/65c9f5db29b3810008f3daa6
😎 Deploy Preview https://deploy-preview-225--astro-theme-cactus.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@chrismwilliams chrismwilliams merged commit 9e934d7 into main Feb 12, 2024
6 checks passed
@chrismwilliams chrismwilliams deleted the fix/ts-imports branch February 12, 2024 10:43
@kirso
Copy link

kirso commented Feb 14, 2024

Hey @chrismwilliams - I can see the changes are mostly formatting of the files and TS.config paths, but what were the packages / changes really? I have a customized version of the theme so I can't just updated it unfortunately :(

@chrismwilliams
Copy link
Owner Author

Hi @kirso, if you mean what does the first bullet point Update pkg's mean, then that's just updating projects dependencies (package.json) to the latest versions.
The other changes are just formatting files as I've added eslint-plugin-perfectionist. It doesn't fundamentally change anything, just import and attribute ordering, so these can be ignored if you wish

@logicman
Copy link

If I run "yarn astro check" I am getting the following errors (after updating all the packages to the latest versions):

src/components/blog/Hero.astro:25:5 - error ts(2322): Type '{ src?: string; width?: number; height?: number; format?: "svg" | "png" | "jpg" | "jpeg" | "tiff" | "webp" | "gif" | "avif"; }' is not assignable to type 'string | ImageMetadata | Promise<{ default: ImageMetadata; }>'.
  Type '{ src?: string; width?: number; height?: number; format?: "svg" | "png" | "jpg" | "jpeg" | "tiff" | "webp" | "gif" | "avif"; }' is not assignable to type 'ImageMetadata'.

25     src={data.coverImage.src}
       ~~~

src/utils/remark-reading-time.ts:5:2 - error ts(2578): Unused '@ts-expect-error' directive.

5  // @ts-expect-error:next-line
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/utils/remark-reading-time.ts:6:19 - warning ts(7044): Parameter 'tree' implicitly has an 'any' type, but a better type may be inferred from usage.

6  return function (tree, { data }) {
                    ~~~~

astro.config.ts:62:16 - warning ts(7044): Parameter 'id' implicitly has an 'any' type, but a better type may be inferred from usage.

62   transform(_, id) {
                  ~~
astro.config.ts:62:13 - warning ts(7044): Parameter '_' implicitly has an 'any' type, but a better type may be inferred from usage.

62   transform(_, id) {
               ~

tailwind.config.ts:41:17 - warning ts(7044): Parameter 'theme' implicitly has an 'any' type, but a better type may be inferred from usage.

41    typography: (theme) => ({
                   ~~~~~

Result (40 files): 
- 2 errors
- 0 warnings
- 4 hints

error Command failed with exit code 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

All paths from tsconfig broke
3 participants