Update @angular-eslint/template/i18n to ignore common nimble and sl-lib attributes (and excludes tests of the name *.spec.ts with inline templates).
fixes #83
Implementation
A new file template/options.js is added to list all well-known attributes that should not be localized for using in NI javascript codebases. This includes common nimble attributes, systemlink-lib-angular attributes, and attributes from commonly used third-party libraries.
This list is used to modify the @angular-eslint/template/i18n eslint rule to ignore any attribute in the list by default. If apps need to change this to ignore only nimble attributes, they have the option to do that by overriding the rule's config in their app's eslintrc.
Testing
I have made modifications to the angular test project to include attributes on the two sample templates that should either be ignored or not ignored and verified the eslint rule modification is being correctly applied in each.
Added a test to verify custom attributes can be added to ignore lists by apps.
Justification
Update
@angular-eslint/template/i18n
to ignore common nimble and sl-lib attributes (and excludes tests of the name*.spec.ts
with inline templates).fixes #83
Implementation
A new file
template/options.js
is added to list all well-known attributes that should not be localized for using in NI javascript codebases. This includes common nimble attributes, systemlink-lib-angular attributes, and attributes from commonly used third-party libraries.This list is used to modify the
@angular-eslint/template/i18n
eslint rule to ignore any attribute in the list by default. If apps need to change this to ignore only nimble attributes, they have the option to do that by overriding the rule's config in their app's eslintrc.Testing