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

ESLint rule: require-super-ondestroy #4505

Open
1 of 2 tasks
amakhrov opened this issue Aug 23, 2024 · 1 comment
Open
1 of 2 tasks

ESLint rule: require-super-ondestroy #4505

amakhrov opened this issue Aug 23, 2024 · 1 comment

Comments

@amakhrov
Copy link
Contributor

amakhrov commented Aug 23, 2024

Which @ngrx/* package(s) are relevant/related to the feature request?

eslint-plugin

Information

The documentation explains that we need to call super.ngOnDestroy() in our component stores: https://ngrx.io/guide/component-store/lifecycle#ondestroy
However, it's easy to forget.
Ideally, it should be enforced automatically. An ESLint rule sounds like a relatively low effort way to achieve that

Describe any alternatives/workarounds you're currently using

Custom eslint rule

I would be willing to submit a PR to fix this issue

  • Yes
  • No
@timdeschryver
Copy link
Member

Hi @amakhrov , I think that would be a great addition.
If you want, feel free to create a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants