usaco-guide
usaco-guide copied to clipboard
Automatic Formatter Pre-Commit Hook?
Related to #2292, it would be great if there was some way to automatically detect (and fix?) some of the most egregious violations of the conventions (at the very least, spaces vs tabs).
should this be an additional feature of the maggie-bot? like "hey, we noticed you're using spaces, please fix this?" thing is, an issue is that the backend website code uses spaces, so how would we differentiate between the two?
if there was some way to automatically detect
in create-xdm-node.ts
it's probably possible to add a plugin that parses the MDX AST to find all the code blocks and check for spaces vs tabs. Then this plugin can throw an error if any obvious issue is found.
(and fix?)
this one I'm not sure about -- possibly some custom Prettier plugin?
Dunno whether this is worth the time investment though... We're currently using XDM for our markdown stuff. At some point when Gatsby finishes up their mdx plugin, we should switch back to mdx v2 (which is very similar to XDM but will actually be maintained in the future).
so any possible resolution for this?