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 types, lints in example #2518

Merged
merged 3 commits into from
Jul 23, 2024
Merged

Fix types, lints in example #2518

merged 3 commits into from
Jul 23, 2024

Conversation

karlhorky
Copy link
Contributor

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and couldn’t find anything (or linked relevant results below)
  • If applicable, I’ve added docs and tests

Description of changes

Small follow-up to #2517 to address the type checking and linting problems with the original code from the Bun docs

Argument of type 'Plugin' is not assignable to parameter of type 'BunPlugin'.
  Types of property 'setup' are incompatible.
    Type '(build: PluginBuild) => void | Promise<void>' is not assignable to type '(build: PluginBuilder) => void | Promise<void>'.
      Types of parameters 'build' and 'build' are incompatible.
        Type 'PluginBuilder' is missing the following properties from type 'PluginBuild': initialOptions, resolve, onStart, onEnd, and 2 more. ts (2345)
Promises must be awaited, end with a call to .catch, or end with a call to .then with a rejection handler. eslint (@typescript-eslint/no-floating-promises)

Signed-off-by: Karl Horky <karl.horky@gmail.com>
Copy link

vercel bot commented Jul 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mdx ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 23, 2024 11:18am

Signed-off-by: Karl Horky <karl.horky@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Jul 23, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (908ff45) to head (8d93c6a).
Report is 42 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #2518   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines         2693      2712   +19     
  Branches         2         2           
=========================================
+ Hits          2693      2712   +19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@karlhorky karlhorky changed the title Fix type check and linting problems Fix Bun example type check and linting problems Jul 23, 2024
Co-authored-by: Titus <tituswormer@gmail.com>
Signed-off-by: Karl Horky <karl.horky@gmail.com>
@wooorm wooorm changed the title Fix Bun example type check and linting problems Fix types, lints in example Jul 23, 2024
@wooorm wooorm merged commit f864886 into mdx-js:main Jul 23, 2024
6 checks passed
@wooorm wooorm added 💪 phase/solved Post is done 📚 area/docs This affects documentation labels Jul 23, 2024
@wooorm
Copy link
Member

wooorm commented Jul 23, 2024

thanks!

@wooorm
Copy link
Member

wooorm commented Jul 23, 2024

Can you try and build the website next time btw? That actually type checks. And finds other problems, such as that toml wasn’t registered, and that your example uses typescript instead of javascript! 05ecf65

@karlhorky
Copy link
Contributor Author

Ah, sorry for the multiple mistakes there 😬 I am actually working on GitHub only, I don't even have this cloned - just relying on GitHub Actions CI and my memory / reviewing to do the right thing.

Would it make sense to add a "smoke test" website build to the GitHub Actions CI?

For my own PRs for now, I'll keep in mind that things can break without being reported by CI.

@karlhorky karlhorky deleted the patch-2 branch July 23, 2024 15:09
@wooorm
Copy link
Member

wooorm commented Jul 23, 2024

Don’t worry about it! It's intentional that things don't break, so newcomers can contribute, even when they're not as neat in their code as the maintainers! Or, a type error can exist for a bit in an example, while the website remains maintainable.
CI did probably show this in the logs btw; if you want to remain in GH but benefit from it, you can go through the logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 area/docs This affects documentation 💪 phase/solved Post is done
Development

Successfully merging this pull request may close these issues.

3 participants