ni / javascript-styleguide

JavaScript and TypeScript Style Guide
MIT License
9 stars 9 forks source link

Update @angular-eslint/template/i18n to ignore common nimble and sl-lib attributes #140

Closed rbell517 closed 3 months ago

rbell517 commented 4 months ago

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

jattasNI commented 3 months ago

This made it into SystemLinkShared with no pipeline failures 🎉