dprint
dprint copied to clipboard
Ability to specify the same plugin twice with different configuration?
Would it be useful to be able to specify the same plugin twice with different configuration (ex. maybe an object could be specified in the plugins array)? What would be some of the use cases? Maybe #711 covers any potential use cases and this is not necessary.
I think I've encountered this issue. I have a folder with files where lines must end with a semicolon, while the rest of the codebase doesn't use semicolons.
Currently, the only option I've found is to exclude the folder from formatting and format it manually. In a more perfect world, I could define:
{
"formatters": [
{
"formatter": "typescript",
"semiColons": "asi",
"excludes": ["myfolder"]
},
{
"formatter": "typescript",
"semiColons": "always",
"includes": ["myfolder"]
},
],
"plugins": [
// maybe it could be used instead of the formatter value
"https://plugins.dprint.dev/typescript-0.88.7.wasm"
]
}