Skip to content
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): allow alias option in [use-track-by-function] #1497

Merged
merged 3 commits into from Oct 15, 2023

Conversation

arturovt
Copy link
Contributor

This commit adds an alias option to the use-track-by-function rule, allowing the specification of a list of properties that should be treated similarly to ngForTrackBy.

Closes #1323

@nx-cloud
Copy link

nx-cloud bot commented Aug 24, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 8f3bbe8. 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.

…unction]

This commit adds an `alias` option to the `use-track-by-function` rule, allowing the
specification of a list of properties that should be treated similarly to `ngForTrackBy`.
@codecov
Copy link

codecov bot commented Aug 27, 2023

Codecov Report

Merging #1497 (8f3bbe8) into main (208bf25) will increase coverage by 0.32%.
Report is 36 commits behind head on main.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1497      +/-   ##
==========================================
+ Coverage   89.23%   89.55%   +0.32%     
==========================================
  Files         162      166       +4     
  Lines        3056     3113      +57     
  Branches      521      526       +5     
==========================================
+ Hits         2727     2788      +61     
+ Misses        201      195       -6     
- Partials      128      130       +2     
Flag Coverage Δ
unittest 89.55% <100.00%> (+0.32%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...emplate/tests/rules/use-track-by-function/cases.ts 100.00% <ø> (ø)
...plugin-template/src/rules/use-track-by-function.ts 100.00% <100.00%> (ø)

... and 11 files with indirect coverage changes

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this require changing a jest config?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is causing warnings to appear in the console, and these warnings are overlapping everything I logged with console.log.

Copy link
Member

@JamesHenry JamesHenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @arturovt! Comments inline

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a full ng-template example of using the custom directive (both a passing and failing case, like we have elsewhere in this file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@JamesHenry
Copy link
Member

You need to run yarn update-rule-docs please

Copy link
Member

@JamesHenry JamesHenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @arturovt!

@JamesHenry JamesHenry merged commit 354d394 into angular-eslint:main Oct 15, 2023
14 checks passed
@arturovt arturovt deleted the feat/1323 branch October 15, 2023 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[template/use-track-by-function] allow custom trackBy-directives
2 participants