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): [prefer-output-readonly] support output() function #1876

Conversation

reduckted
Copy link
Contributor

Fixes #1871

The prefer-output-readonly rule will now report a problem for any class property that does not have the readonly modifier and has either a type annotation of OutputEmitterRef<T>, or is assigned the result of the output() function.

Copy link

nx-cloud bot commented Jun 9, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 8663376. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 6 targets

Sent with 💌 from NxCloud.

Copy link

codecov bot commented Jun 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.63%. Comparing base (759f07d) to head (8663376).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1876   +/-   ##
=======================================
  Coverage   91.62%   91.63%           
=======================================
  Files         179      179           
  Lines        3380     3383    +3     
  Branches      547      547           
=======================================
+ Hits         3097     3100    +3     
  Misses        144      144           
  Partials      139      139           
Flag Coverage Δ
unittest 91.63% <100.00%> (+<0.01%) ⬆️

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

Files Coverage Δ
.../eslint-plugin/src/rules/prefer-output-readonly.ts 100.00% <100.00%> (ø)
...plugin/tests/rules/prefer-output-readonly/cases.ts 100.00% <ø> (ø)

@MillerSvt
Copy link

Please add support for OutputRef from function outputFromObservable

@reduckted
Copy link
Contributor Author

Please add support for OutputRef from function outputFromObservable

That should already be handled.

https://github.com/angular-eslint/angular-eslint/pull/1876/files#diff-ad617ad607520c48f95c79841c319e69e8a3beaeda23df74f5715522224a9c86R172

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.

Thank you @reduckted!

@JamesHenry JamesHenry merged commit 9103be6 into angular-eslint:main Jun 30, 2024
7 checks passed
@reduckted reduckted deleted the feature/prefer-output-readonly-support-output-function branch June 30, 2024 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[prefer-output-readonly] support output() function
4 participants