-
-
Notifications
You must be signed in to change notification settings - Fork 216
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
feat(eslint-plugin-template): [prefer-ngsrc] add rule #1477
Conversation
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.
Thank you @strawberry-choco!
Just a couple of instances of the same point and then this is good to go
5ddf7a3
to
8c704c1
Compare
@strawberry-choco You just need to fix up the formatting, you can run |
8c704c1
to
f74ea18
Compare
So, can someone run the CI again? |
description: 'should fail image when using both src and ngsrc', | ||
annotatedSource: ` | ||
<ng-template> | ||
<img ngSrc="http://localhost" src="http://localhost"> |
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.
I read from the source that the error will always be at the src
-attribute, and not necessarily the second attribute.
Might be a good idea to add a test where src
and ngSrc
are reversed.
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.
Agreed, thanks @jerone!
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.
Fixed.
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 4e96532. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 7 targets
Sent with 💌 from NxCloud. |
@@ -10,6 +10,7 @@ | |||
"@angular-eslint/template/mouse-events-have-key-events": "error", | |||
"@angular-eslint/template/no-autofocus": "error", | |||
"@angular-eslint/template/no-distracting-elements": "error", | |||
"@angular-eslint/template/prefer-ngsrc": "error", |
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.
Please remove this again, it is what is causing the integration tests to fail
A) you should not manually patch this file, it is generated based on using a prefix in the rule description
B) we will not be modifying the accessibility config in minor versions. We will only do that in major versions
C) I don't believe this even is an accessibility rule? It's a web performance rule?
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.
Fixed.
@strawberry-choco just following up on this one, please could you add a test case per jerone's comment, and revert the update to the accessibility config? |
97c89c6
to
e6e8b35
Compare
e6e8b35
to
4e96532
Compare
Sorry, got a little busy recently and forgot about this PR. Thanks for the reminder. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1477 +/- ##
==========================================
+ Coverage 89.46% 89.54% +0.08%
==========================================
Files 164 166 +2
Lines 3085 3110 +25
Branches 525 527 +2
==========================================
+ Hits 2760 2785 +25
Misses 195 195
Partials 130 130
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Thanks! |
Adds a rule to use the
ngSrc
attribute oversrc
.Closes #1265