Open sgallen opened 6 years ago
I believe @wKoza worked on this https://github.com/mgechev/codelyzer/pull/506/files
Hi,
That's what I feared . it is going to be difficult to distinguish ng-container
declared by developer and generated by Angular.
Reference: PR #506
Today I updated to version 4.2.1 of Codelyzer, as I was finding the linter was incorrectly reporting errors with our use of
select
ICU expressions (see: https://angular.io/guide/i18n#translate-select). PR #506 seems to have addressed those issues (thanks!). Unfortunately, I'm now finding that when I useng-container
tags with i18n ids (see: https://angular.io/guide/i18n#translate-text-without-creating-an-element) I get linting errors, that I don't expect.I've cloned the repo, locally adding 2 tests to the suite. They're identical tests except for the use of different tags (
ng-container
vsspan
). As you'll see further belowng-container
fails whilespan
works fine:This is the output:
One caveat, is that I don't see any tests in which both
check-id
andcheck-text
are set so it's possible I shouldn't be configuring the linter to use both. Not sure. This is the line that I have in my tslint file:"i18n": [true, "check-id", "check-text"]