-
Notifications
You must be signed in to change notification settings - Fork 140
Add prettier support #781
Comments
I had a few experience hacking Atom, so I may be able to give some pointer.
|
I think that executing prettier is out-of-scope for this plugin. That said, it might be possible to create a separate atom plugin to run prettier in atom's I think that having a separate |
Actually, it looks like |
It accepts text!
This actually gave me an idea! There's an existing plugin. Upon looking at the code, I found that they're actually already using I wonder if there's a way that we could get rid of that flash of semicolons everytime I save though... |
I'm thinking the best thing to get rid of that flash of semicolons would be to integrate ESLint and |
Great, I'm glad it works! I doubt there's a way to avoid the flash of changes. After all, what's going on is prettier is changing the text in the editor, then the file is saved to disk, then Yes, it could be more seamless if the output of prettier could somehow be piped directly to eslint before changing the text buffer. But, aside from the problems I mentioned with that being out-of-scope for |
Hmm... Could we not use the |
A rewrite of |
As @Arcanemagus mentioned, we have talked about refactoring Even if we do switch to In light of this, I'm going to close the issue. The good news is that at least the prettier and eslint plugins can inter-operate for now. If we do switch to |
FYI for anyone coming after, I'm currently working on Simply disable |
Just to be clear, you mean "don't enable" since it's not enabled by default 😉. |
Issue Type
Feature Request
Issue Description
prettier
is a great new package by @jlongster that will automatically format your code. It's really quite impressive! And I really want to use it. However I prefer to omit semicolons and @jlongster would prefer to avoid adding the complexity at this time (understandably). I was planning on doing what @dtinth did by creating my own formatter that uses ESLint rather than Standard, but realized that it would even better if I could just add prettier to this package!So, I plan on making a fork to do this, and will be making a pull request to add the configuration option to enable prettier (disabled by default). If you have any tips on where/how to add the code, I'd love to hear them! Thanks
The text was updated successfully, but these errors were encountered: