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

[prefer-output-readonly] stops working #1787

Open
2 tasks done
de-don opened this issue Apr 26, 2024 · 1 comment
Open
2 tasks done

[prefer-output-readonly] stops working #1787

de-don opened this issue Apr 26, 2024 · 1 comment
Labels
package: eslint-plugin Angular-specific TypeScript rules triage This issue needs to be looked at and categorized by a maintainer

Comments

@de-don
Copy link

de-don commented Apr 26, 2024

The rule @angular-eslint/prefer-output-readonly stops working after updating to angular 16.

{
  "files": ["*.ts"],
  "extends": [
    "plugin:@nx/typescript",
    "plugin:@nx/angular",
    "plugin:@angular-eslint/template/process-inline-templates"
  ],
  "rules": {
    //...
    "@angular-eslint/prefer-output-readonly": "error",
    //...
  }
}
  @Output()
  public emitter1 = new EventEmitter<void>();
  
  @Output() public emitter2 = new EventEmitter<void>();

Versions

package version
@angular-eslint/eslint-plugin 16.3.1
@typescript-eslint/parser 6.21.0
ESLint 8.48.0
node 18.18.2
  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest supported version of the packages and checked my ng version output per the instructions given here.
@de-don de-don added package: eslint-plugin Angular-specific TypeScript rules triage This issue needs to be looked at and categorized by a maintainer labels Apr 26, 2024
@json-derulo
Copy link
Contributor

This should have failed the unit tests of that rule. Are you sure you have configured everything correctly? Have you added "@angular-eslint" to your plugins array? With the given setup it would be expected to not work, as the plugin is not registered. Alternatively, you can extend from the recommended rules.

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

No branches or pull requests

2 participants