Add remark-plugin-autonbsp to list of plugins#1476
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Cool project!
A few tips:
- You can build the project with
tsc. You don’t need Vite. - If you do really want to use Vite for some reason: Vitest understands
vite.config.ts, so you can removevitest.config.ts. - The
typesfield describes how to resolve types for themainfield. You didn’t specify themainfield. You should specify it if you want to support it. If you do specify themainfield, you no longer need thetypesfield. - For my personal projects I no longer support the
mainfield. I find it more valuable teaching people to use the correctmodulesettings the TS config. - You can simplify this:
into:
"exports": { ".": "./dist/index.js" }
"exports": "./dist/index.js"
- The
prepublishOnlyscript runs before packing, but only if publishing directly. I recommend usingprepack, which always happens before packing. - Perhaps this would be better as a rehype plugin instead of a remark plugin.
|
@remcohaszing thank you for your review, I appreciate this. I've copied build and tests config from my another project as a boilerplate and noticed that it's overkill later. I'll fix it soon.
Can you explain why? Here's my thinking: I type If I understand correctly, rehype is about transforming MD to HTML. With remark plugin it's possible to enhance user input while still storing markdown (may be not the best server solution but still possible) |
|
remark plugins are about transforming markdown. Typically users want to transform the HTML output, not the source files. They often reach for remark plugins, because remark is more known than rehype. In that case a rehype plugin is actually more appropriate. If your goal is to modify markdown files, then you are correct, a remark plugin is the correct choice. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1476 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 6 6
Lines 138 138
=========================================
Hits 138 138 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
remark-plugin-autonbsp to list of plugins
remark-plugin-autonbsp to list of pluginsremark-plugin-autonbsp to list of plugins
|
Thanks! :) |
|
Hi! This was closed. Team: If this was merged, please describe when this is likely to be released. Otherwise, please add one of the |
Initial checklist
Description of changes
Add remark-plugin-autonbsp to the list of plugins