Error when a plugin returns an empty string for non-whitespace text with char length over certain amount
dsherret opened this issue · comments
David Sherret commented
If a formatter is provided a string length greater than say 100 and the output is an empty text (then double check for non-whitespace char length of greater than 100), then dprint should error because this is most likely a mistake.
I thought I already had this built into dprint, but I can't find the code atm. Maybe it was just in a branch (Edit: Oh, it was in the exec plugin https://github.com/dprint/dprint-plugin-exec/blob/5637a11b28260264a331b66d516a9f5432e2bdb4/src/handler.rs#L243C9-L255)
Related: dprint/dprint-plugin-typescript#563