We were discussing Prettier plugin support in Atom with @robwise and faced the default parser problem.
Until Prettier stops parsing unsupported files as suggested in #2884, its editor extensions need to be fed with a whitelist of supported scopes. Without this list, Prettier would throw an exception when a user presses cmd+s for an unsupported file type or silently fail on real parse errors, which is also undesired. Because #2884 cannot be resolved until Prettier 2.0 and this might take a while, is there any room for a new API call like prettier.isFileSupported(file) and a corresponding CLI option? This feature could be used by the editor extensions before applying format on safe, and as a consequence, save a user from maintaining a whitelist of scopes.
How do you see the exterior of this feature look like? I can help with a PR if it has a potential to land to Prettier < 2.0.
We were discussing Prettier plugin support in Atom with @robwise and faced the default parser problem.
Until Prettier stops parsing unsupported files as suggested in #2884, its editor extensions need to be fed with a whitelist of supported scopes. Without this list, Prettier would throw an exception when a user presses
cmd+sfor an unsupported file type or silently fail on real parse errors, which is also undesired. Because #2884 cannot be resolved until Prettier 2.0 and this might take a while, is there any room for a new API call likeprettier.isFileSupported(file)and a corresponding CLI option? This feature could be used by the editor extensions before applying format on safe, and as a consequence, save a user from maintaining a whitelist of scopes.How do you see the exterior of this feature look like? I can help with a PR if it has a potential to land to Prettier < 2.0.