-
Notifications
You must be signed in to change notification settings - Fork 48
Remove prettier-plugin-toml dependency to fix minimal template #408
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
base: main
Are you sure you want to change the base?
Conversation
@blaggacao 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
Co-authored-by: blaggacao <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@sstitle this looks like a correct quick fix, removing toml support. Pleas lt me know what you think of it or if you have any opinion towards alternative paths of actions (like looking for an alternative tonl formatter - suggestions?). |
@copilot can you also remove the support for toml in treefmt, should it still exist? |
I've already removed all TOML support from treefmt in commit 6714ba8. The changes include:
There's no additional TOML formatting support remaining in treefmt that needs to be removed. |
I'm not sure I know enough about the context of what TOML is used for in mdbook. I certainly don't think I need it. Anything that makes the minimal template functional is a suitable fix in my opinion. Thanks for your help! |
We got a small rabbit hole between this PR and the merge button: CI is red. :-) Let'see if Copilot can drive this. |
perhaps failing b/c of nix version? |
The minimal template was failing during git commit with a module not found error for prettier-plugin-toml. The error occurred because the hardcoded path to the plugin was incorrect:
This was caused by the hardcoded path
${nixpkgs.nodePackages.prettier-plugin-toml}/lib/node_modules/prettier-plugin-toml/lib/index.js
in the treefmt configuration, which no longer exists due to changes in the package structure.Following the maintainer's suggestion to drop TOML support from prettier, this PR removes the prettier-plugin-toml dependency entirely:
nixpkgs.nodePackages.prettier-plugin-toml
from packages in bothtreefmt.nix
andmdbook.nix
--plugin
option and hardcoded path from prettier configuration*.toml
from prettier's file includes listThe change preserves all other formatting functionality (nix, shell, CSS, HTML, JS, JSON, JSX, MD, MDX, SCSS, TS, YAML) while eliminating the problematic TOML formatting via prettier. TOML files will simply not be formatted automatically, but the minimal template will work without errors.
Fixes #407.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.