Rule Proposal: Add option for "requireId" to require-localize-metadata #1790
MFStapert
started this conversation in
New Rule Proposals
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The
@angular-eslint/template/i18n
rule contains the option to make id's mandatory in your templates, however there is no such rule for the$localize
function in components. Thus there is no way to automatically check if an id is present:Template
<p>Hello i18n!</p>
Results in an error when
@angular-eslint/template/i18n
is enabled due to missing ID.Component:
const localizedText = $localize
Hello i18n!;
Does not result in an error when
@angular-eslint/require-localize-metadata
is enabled due to missing ID.Proposal:
Add the option
requireId
to the@angular-eslint/require-localize-metadata
rule, which check for IDs when using the$localize
function.Beta Was this translation helpful? Give feedback.
All reactions