Skip to content

Commit

Permalink
feat(eslint-plugin): add new rule require-super-ondestroy
Browse files Browse the repository at this point in the history
  • Loading branch information
markoblagdan committed Dec 9, 2024
1 parent 2c1fd97 commit c9379a3
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ class BooksStore extends ComponentStore<BooksState> implements OnDestroy
super.ngOnDestroy();
this.cleanUp();
}
}`,
`
import { ComponentStore } from '../components/component-store';
class BooksStore extends ComponentStore implements OnDestroy
{
cleanUp() {}
override ngOnDestroy(): void {
this.cleanUp();
super.ngOnDestroy();
}
}`,
];

Expand Down Expand Up @@ -101,6 +113,18 @@ class BooksStore extends ComponentStore<BooksState> implements OnDestroy {
~~~~~~~~~~~ [${messageId}]
super.get();
}
}`),
fromFixture(`
import { ComponentStore } from '../components/component-store';
class BooksStore extends ComponentStore implements OnDestroy
{
cleanUp() {}
override ngOnDestroy(): void {
~~~~~~~~~~~ [${messageId}]
this.cleanUp();
}
}`),
];

Expand Down

0 comments on commit c9379a3

Please sign in to comment.