As stated in https://github.com/prettier/prettier/issues/42 and https://github.com/prettier/prettier-atom/issues/90, it would be great to have prettier surrender to the specs defined in a project-wise .editorconfig file.
Makes sense, however we will probably hold off and see if this will be implemented at prettier or if this should be implemented by the editor plugins (us and prettier-atom). We will follow the prettier discussion and see.
Is this really feasible? Options are missing in editorConfig but are in prettier (semi). The opposite is also true (a lot).
How is #70 an alternative? Of course there are options missing in .editorconfig, but if it would at least 'obey' the options that are available, that would be nice.
Also the editorconfig extension is quite often used is VSCode. They have 265566 downloads at this moment.
It's an alternative to share a config. But of course nothing to do with editorconfig.
The missing part means it would require to set configuration in different files or accept default values.
I'm not closed to it ;-) just not that convinced.
The .editorconfig also serves to control the code presentation on GitHub, it is especially important if you use tabs (because tab width otherwise defaults to8), so one could argue that you anyways need to add this file and then copy the settings from Prettier (unless Prettier would consume the settings from editorconfig, of couse). And then my editor also reads the .editorconfig and adjusts tabs and spaces automatically, so with this enhancement, all this presentation would only need a single configuration.
This extension should simply use the current active settings of VS Code regarding indentation. The editorconfig extension just changes those settings, so we'll get the compatibility with it automatically then
Why have prettier indent code using say 2 spaces in an editor that inserts say 4 spaces when tab is pressed?
Was exactly thinking about it. #34 was already about that. is editor config updating those options?
Only trouble I see with that is the breaking change it would induce.
I checked its code, and yes, that's exactly how it works: it controls the 2 options - insertSpaces and tabSize.
Good news here, reading editorconfig is certainly coming in next prettier version (1.9)
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Good news here, reading editorconfig is certainly coming in next prettier version (1.9)