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
Support file extension-specific configuration #17
Comments
Turns out prettier already supports this as
This fails while parsing the object:
|
Oh nice! I just need to implement dprint/dprint#530 in that case |
@midgleyc the "overrides" is supported now. Thanks for investigating that! You will need to upgrade to dprint 0.28 and dprint-plugin-prettier 0.8 though |
Hi @dsherret . Thanks for the prompt update, I see that Unfortunately it is not working for me. I have put together a repository at https://github.com/midgleyc/dprint-prettier-test to show the issue: with the same config across |
@midgleyc very sorry, I looked into this a bit just now and this definitely doesn't work. I must have flipped some condition in my head when I was testing it manually. Looking into it more, it would be trivial to add this for stuff like That said, I think for the purposes of this plugin doing extension level config should work well and will solve your use case. So I'm going to implement your original suggestion tonight and it will more easily have automated tests: {
"prettier": {
"singleQuote": false,
"ts.singleQuote": true
}
} Once again, my bad, but fix will be incoming soon tonight. |
Should be fixed now. Added a test and updated the readme: https://github.com/dprint/dprint-plugin-prettier#file-extension-specific-configuration |
Works great now, thank you! |
Thanks for making this -- it's a lot faster than prettier straight.
Unfortunately I can't port my config over. Prettier supports automatically reading config from a
.editorconfig
file, and I'm using that to use single quotes in.ts
files and double quotes elsewhere (e.g. SCSS)Could you make it possible to specify prettier config for extensions individually? For example, something like:
would translate the above (although there might be a better design).
The text was updated successfully, but these errors were encountered: