(eslint-plugin-template) Rule proposal: Equivalent of eslint rule prefer-template
#2297
Replies: 4 comments
-
|
Cool, thanks, makes sense to have a rule for this, PRs welcome!
Maybe (even though a little silly) |
Beta Was this translation helpful? Give feedback.
-
|
I tried a PR.
|
Beta Was this translation helpful? Give feedback.
-
|
Just in case it saves anyone else time :) The right syntax is: NOT: ( Maybe a future version of this check, or a separate check, can tell if you try to use the wrong one in either context? |
Beta Was this translation helpful? Give feedback.
-
|
This rule was added https://github.com/angular-eslint/angular-eslint/blob/9183385da258caaff6ff3817a6517665e48808b3/packages/eslint-plugin-template/src/rules/prefer-template-literal.ts |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Equivalent of prefer-template in template files.
With Angular 19.2 template literals expressions are supported : https://github.com/angular/angular/releases/tag/19.2.0
❌ Invalid Code :
✅ Valid Code :
Beta Was this translation helpful? Give feedback.
All reactions