-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add a flag to skip formatting the code inside the Markdown files #3284
Comments
I think it is better to close this and only add an option when somebody that wants it asks for it. |
This flag should be useful for someone only cares about the markdown formatting and they have their own js coding style that is conflict with Prettier. The implementation should be pretty easy, just adding a condition to not enter the subtree-parser, but I'm not sure what should we name it, Lines 31 to 42 in 4b070c3
|
Maybe something with code fences |
What's wrong with |
if you have a big codebase with documentation and lots of code for this could be annoying.. |
@lipis For that electron case, eslint could add the spaces in function declarations after a prettier run... but I dunno if eslint can format code within markdown code blocks. |
eslint is parsing .js files and not .md so I'm not sure if we can do anything about it. |
|
Electron closed that issue electron/electron#11156 so I will close this one as well and in case somebody is going to need that flag we can rethink of it.. until then 🍻 🍺 |
If you ask me to personally, TBH I don't really need this option.. but I can see that in some cases you might don't want to reformat your code inside the documentation for your own reasons.. One example can be found here and I'm not sure how to fix it :)
electron/electron#11143
WDYT?
The text was updated successfully, but these errors were encountered: