Lint on unnecessary {} in string interpolation #22025
Labels
analyzer-linter
Issues with the analyzer's support for the linter package
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
closed-invalid
Closed as we don't believe the reported issue is generally actionable
type-enhancement
A request for a change that isn't a bug
If the interpolated expression is just a simple identifier (and the string after the interpolation is not alphanumeric), then the {} are not needed. Given:
"Hi, ${name}!"
The linter should suggest:
"Hi, $name!"
The text was updated successfully, but these errors were encountered: