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

Enable @angular-eslint/no-empty-lifecycle-method lint rule #430

Merged
merged 2 commits into from
Jul 29, 2024

Conversation

meisekimiu
Copy link
Member

This linting rule prohibits empty lifecycle methods on components, services, etc. This PR enables that linting rule in the web app, and then fixes all new linting errors. It also includes Prettier formatting and some miscellaneous cleanup work.

Lint rule: @angular-eslint/no-empty-lifecycle-method

Copy link

codecov bot commented Jul 26, 2024

Codecov Report

Attention: Patch coverage is 54.37500% with 73 lines in your changes missing coverage. Please review.

Project coverage is 39.00%. Comparing base (d747a46) to head (b5688f4).

Files Patch % Lines
...s/global-search-bar/global-search-bar.component.ts 6.38% 44 Missing ⚠️
...c/app/shared/components/prompt/prompt.component.ts 44.44% 5 Missing ⚠️
...ared/components/static-map/static-map.component.ts 42.85% 4 Missing ⚠️
...er/components/folder-view/folder-view.component.ts 25.00% 3 Missing ⚠️
...le-browser/components/sidebar/sidebar.component.ts 25.00% 3 Missing ⚠️
...itcher-dialog/archive-switcher-dialog.component.ts 25.00% 3 Missing ⚠️
...connections-dialog/connections-dialog.component.ts 33.33% 2 Missing ⚠️
...omponents/folder-picker/folder-picker.component.ts 66.66% 2 Missing ⚠️
...lti-select-status/multi-select-status.component.ts 60.00% 2 Missing ⚠️
...-preferences/notification-preferences.component.ts 33.33% 2 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #430      +/-   ##
==========================================
- Coverage   39.10%   39.00%   -0.11%     
==========================================
  Files         339      339              
  Lines       10922    10922              
  Branches     1793     1795       +2     
==========================================
- Hits         4271     4260      -11     
- Misses       6509     6517       +8     
- Partials      142      145       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Enable this linting rule that forbids empty lifecycle methods,
preferring that services and components just not implement the lifecycle
interfaces instead.

Lint rule: @angular-eslint/no-empty-lifecycle-method
Remove any empty lifecycle methods, the `implements` references to these
lifecycle methods, and remove imports of these now deleted lifecycle
methods.

This commit also includes Prettier formatting and some small code
cleanup in edited files. Specifically deletion of unused dependencies,
removal of unused constructor parameters, and some miscellaneous code
style edits.

Lint rule: @angular-eslint/no-empty-lifecycle-method
@meisekimiu meisekimiu force-pushed the lint/no-empty-lifecycle-method branch from 38e000d to b5688f4 Compare July 29, 2024 15:42
@meisekimiu meisekimiu merged commit 5816fd1 into main Jul 29, 2024
4 checks passed
@meisekimiu meisekimiu deleted the lint/no-empty-lifecycle-method branch July 29, 2024 15:53
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.

None yet

2 participants