sdk
sdk copied to clipboard
use preferred quote-style when generating imports
Import quote style should agree with enabled lints.
-
prefer_single_quotes
vs. -
prefer_double_quotes
I'm inclined to think the unspecified default should be single quotes (current behavior).
/fyi @lrhn
Agreed. As far as I can remember, there have been no complaints about the default.
One possible alternative is to use the quoting of existing imports, if there are any, and only fall back on single quotes if there are no imports at all.
Yes, that's another valid signal. I think that if there's a signal in the form of an enabled lint that that should take precedence over the signal from existing code, but the signal from existing code should take precedence over the default.
https://dart-review.googlesource.com/c/sdk/+/260520
"Generating imports" is finished, but the issue scope would be increased to also support "generating strings"
https://dart-review.googlesource.com/c/sdk/+/260523
I am not sure where else "generating string" should be tackled.
I'm not sure either. We can either look at every refactoring and correction producer, or wait for user feedback.