Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[prefer-signals] add option for preferOutputSignal #2258

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

Closed
DerHerrGammler opened this issue Feb 23, 2025 · 2 comments · Fixed by #2324
Closed

[prefer-signals] add option for preferOutputSignal #2258

DerHerrGammler opened this issue Feb 23, 2025 · 2 comments · Fixed by #2324
Labels
package: eslint-plugin Angular-specific TypeScript rules triage This issue needs to be looked at and categorized by a maintainer

Comments

@DerHerrGammler
Copy link

Description and reproduction of the issue

Since the rule prefer-signals already has options to prefer input signals and prefer query signals I think it would be good to add a option for prefer output signals as well that will mark @Output for a replacement.

Versions

package version
@angular-eslint/eslint-plugin 19.1.0
@typescript-eslint/parser 7.18.0
ESLint 8.57.1
node 20.15.0
# Please run `npx ng version` in your project and paste the full output here:

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 19.1.8
Node: 20.15.0
Package Manager: npm 10.7.0
OS: linux x64

Angular: 19.1.7
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.1901.8
@angular-devkit/build-angular     19.1.8
@angular-devkit/core              19.1.8
@angular-devkit/schematics        19.1.8
@angular/cdk                      19.1.5
@angular/cli                      19.1.8
@angular/material                 19.1.5
@angular/material-luxon-adapter   19.1.5
@angular/pwa                      19.1.8
@schematics/angular               19.1.8
ng-packagr                        19.1.2
rxjs                              7.8.2
typescript                        5.7.3
zone.js                           0.15.0
@DerHerrGammler DerHerrGammler added package: eslint-plugin Angular-specific TypeScript rules triage This issue needs to be looked at and categorized by a maintainer labels Feb 23, 2025
@reduckted
Copy link
Contributor

output() doesn't actually create a Signal, so technically the option doesn't belong in that rule. I do agree with the spirit of this request though. 👍

Maybe a new rule called prefer-output-emitter-ref?

Related: #1719 (comment)

@JeevanMahesha
Copy link

As output is not a Signal I recommend to go with new rule for this as @reduckted suggestion we can call it as prefer-output-emitter-ref

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: eslint-plugin Angular-specific TypeScript rules triage This issue needs to be looked at and categorized by a maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants