-
-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(eslint-plugin-template): handle 'innerHtml' input properly #242
fix(eslint-plugin-template): handle 'innerHtml' input properly #242
Conversation
@@ -21,7 +21,7 @@ ruleTester.run(RULE_NAME, rule, { | |||
valid: [ | |||
'<h1>Heading Content!</h1>', | |||
'<h2><app-content></app-content></h2>', | |||
'<h3 [innerHTML]="dangerouslySetHTML"></h3>', | |||
'<h3 [innerHtml]="dangerouslySetHTML"></h3>', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, there's already a test case on line 28 that test the innerHTML
:
angular-eslint/packages/eslint-plugin-template/tests/rules/accessibility-elements-content.test.ts
Line 28 in 3bc9307
'<a [innerHTML]="dangerouslySetHTML"></a>', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
3bc9307
to
62d7275
Compare
62d7275
to
9440c42
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks a lot!
I need to report this flakiness to verdaccio, it's so frequent on the integrations test job, particular on master... |
Reported it to verdaccio: verdaccio/verdaccio#2038 |
Current behavior:
We can pass html content by using
innerHTML
andinnerHtml
. The later isn't currently ignored by the rule.Expected behavior:
I also replaced conditionals by selectors to make it more readable and shorter.