Skip to content

Lint on unnecessary {} in string interpolation #22025

Closed
@munificent

Description

@munificent

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!"

Metadata

Metadata

Assignees

Labels

closed-invalidClosed as we don't believe the reported issue is generally actionabledevexp-linterIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.type-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions