Remove unused declarations and const-related lint debt - #686
Merged
fpigeonjr merged 28 commits intoSep 10, 2026
Merged
Conversation
Removes unused imports/vars flagged by @typescript-eslint/no-unused-vars and converts never-reassigned let to const (prefer-const) in: - src/ui-kit/elements/button/button.spec.ts - src/ui-kit/pipes/filesize/filesize.pipe.spec.ts - src/formly/components/autocomplete/autocomplete.component.ts - src/ui-kit/wrappers/fieldset-wrapper/* - src/ui-kit/wrappers/label-wrapper/* Part of #585.
- are-equal.ts: destructured multi-var let -> const - key-helper.ts: prefer-const for lowercased - key-helper.spec.ts: remove unused 'instance' declaration, convert never-reassigned test helper lets to const Part of #585.
- click-outside, focus, tab-outside, sticky specs: drop unused waitForAsync/fakeAsync/tick imports and the never-read 'directive' local (query it directly per-test instead where actually used) - external-link.spec.ts: drop unused imports, convert let->const - drag-drop.directive.ts: drop unused HostListener event param - sticky.component.ts: drop unused resize/scroll event params Part of #585.
Drops unused waitForAsync/Component/By imports and unused 'component' locals across form-only-page, grid directives+specs, list-results-message, page/page.service, pages/form-step, results, sidebar, title-and-section, and workspace-template specs. Converts never-reassigned let->const in column.directive.ts and the grid *.spec.ts row/col/grid class-value tests. Part of #585.
All never-reassigned let declarations in the HierarchicalDataService test fixture converted to const. Part of #585.
- Removes unused event/ev handler params, converts them to () when truly unused, or renames to _val for CVA setter params that must keep an arg for the type signature - Converts never-reassigned let->const throughout getObjectValue, updateDelimeterModel, selectItem, getFlatElements, scrollToSelectedItem, showFreeText, createFreeTextItem, onScroll - Propagates the same propogateChange no-op-arg fix to sibling CVA implementations that shared the identical unused-param pattern (hierarchical/hierarchical, hierarchical/autocomplete, hierarchical/selected-result, sam-sds-autocomplete/selected-result, form-controls/autocomplete) Part of #585.
- Drop unused rxjs 'of' import (only used in a doc comment example) - Prefix unused requestError/checkForFocus event params with _ - Remove dead 'categories'/'index'/'arr' locals in filterKeyValuePairs - Convert never-reassigned let->const throughout onDownArrowDown, setMessage, onUpArrowDown, listItemHover, onEnterDown, onScroll, freeTextAvalible Part of #585.
…grid, autocomplete-multiselect specs/component Part of #585.
… autocomplete, date-range-v2 calendar spec, date component Part of #585.
…ension.component Part of #585.
…icon.component, selected-result spec Part of #585.
…al-tree, title component, sam-sds-autocomplete spec Part of #585.
…ion specs/components Part of #585.
…ideo-player experimental components Part of #585.
…tton, sam-sds-autocomplete, time, toggle-switch, name-entry, header spec Part of #585.
…alert-footer, breadcrumbs, comments.service, image, modal, point-of-contact Part of #585.
…hierarchical-tree-grid, sideNavigationToolbar, tab-header, sam-form-control, textarea, international-phone, name-entry, filters-wrapper Part of #585.
…grid, events, hierarchical-tree spec, listbox, actionbar, sidenav, autocomplete-multiselect Part of #585.
…ct, textarea, time, toggle-switch, upload-v2, phone-entry, footer Part of #585.
…age-title, pagination, sidenav.service, spinner, tabs, banner, alert specs Part of #585.
…ls, form-templates, layout) Zero occurrences remain for @typescript-eslint/no-unused-vars and prefer-const. Part of #585.
Reflects the ~590 warnings removed while burning down no-unused-vars and prefer-const debt (#585). Generated via npm run lint:baseline:bump.
…t cleanup Part of #585.
There was a problem hiding this comment.
🟡 Changes recommended
Required handler and service parameters were removed despite remaining typed, template, and contract call sites.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Removes unused declarations, applies const where possible, and strengthens root-workspace lint enforcement.
Changes:
- Removes unused imports, variables, and parameters.
- Converts stable declarations to
const. - Promotes
no-unused-varsandprefer-constto errors and lowers the warning baseline. - Introduces several blocking method-arity mismatches at existing call sites.
File summaries
| File | Description |
|---|---|
src/ui-kit/wrappers/label-wrapper/label-wrapper.spec.ts |
Cleans unused test imports. |
src/ui-kit/wrappers/label-wrapper/label-wrapper.component.ts |
Cleans callback parameters. |
src/ui-kit/wrappers/fieldset-wrapper/fieldset-wrapper.spec.ts |
Cleans unused test imports. |
src/ui-kit/wrappers/fieldset-wrapper/fieldset-wrapper.component.ts |
Removes an unused resize parameter. |
src/ui-kit/utilities/key-helper/key-helper.ts |
Converts a binding to const. |
src/ui-kit/utilities/key-helper/key-helper.spec.ts |
Cleans test declarations. |
src/ui-kit/utilities/are-equal/are-equal.ts |
Converts a binding to const. |
src/ui-kit/pipes/filesize/filesize.pipe.spec.ts |
Makes the pipe binding constant. |
src/ui-kit/layout/toolbar/toolbar.spec.ts |
Removes unused fixture state. |
src/ui-kit/layout/pagination/pagination.component.spec.ts |
Cleans imports and declarations. |
src/ui-kit/layout/page/pagination.component.spec.ts |
Removes an unused router import. |
src/ui-kit/layout/header/header.component.ts |
Makes a selected item constant. |
src/ui-kit/layout/header/header.component.spec.ts |
Cleans imports and constants. |
src/ui-kit/layout/footer/footer.component.spec.ts |
Removes unused testing utilities. |
src/ui-kit/layout/filters-wrapper/filters-wrapper.component.ts |
Removes unused RxJS values. |
src/ui-kit/layout/filter-drawer/filter-drawer.component.ts |
Removes an unused service import. |
src/ui-kit/layout/filter-drawer/dynamic-chips/dynamic-chips.directive.ts |
Makes a component reference constant. |
src/ui-kit/layout-deprecated/workspace/workspace-template.spec.ts |
Removes unused test state. |
src/ui-kit/layout-deprecated/title-and-section.spec.ts |
Removes unused test state. |
src/ui-kit/layout-deprecated/sidebar.spec.ts |
Removes unused test state. |
src/ui-kit/layout-deprecated/results.spec.ts |
Removes unused test state. |
src/ui-kit/layout-deprecated/pages/form-step.spec.ts |
Removes unused test imports. |
src/ui-kit/layout-deprecated/page.spec.ts |
Removes unused declarations. |
src/ui-kit/layout-deprecated/page.service.spec.ts |
Removes unused imports. |
src/ui-kit/layout-deprecated/list-results-message.spec.ts |
Cleans imports and constants. |
src/ui-kit/layout-deprecated/grid/row.spec.ts |
Cleans test declarations. |
src/ui-kit/layout-deprecated/grid/row.directive.ts |
Removes an unused Angular import. |
src/ui-kit/layout-deprecated/grid/grid.spec.ts |
Cleans test declarations. |
src/ui-kit/layout-deprecated/grid/grid.directive.ts |
Removes an unused Angular import. |
src/ui-kit/layout-deprecated/grid/column.spec.ts |
Cleans test declarations. |
src/ui-kit/layout-deprecated/grid/column.directive.ts |
Makes a lookup constant. |
src/ui-kit/layout-deprecated/form-only-page.spec.ts |
Removes unused test state. |
src/ui-kit/form-templates/phone-entry/phone-entry.component.ts |
Removes unused forms imports. |
src/ui-kit/form-templates/name-entry/name-entry.spec.ts |
Cleans imports and callbacks. |
src/ui-kit/form-templates/name-entry/name-entry.component.ts |
Removes a validator parameter still required by its contract and tests. |
src/ui-kit/form-templates/international-phone/sam-telephone/telephone.spec.ts |
Removes an unused test value. |
src/ui-kit/form-templates/international-phone/sam-extension/extension.spec.ts |
Removes an unused mock event. |
src/ui-kit/form-templates/international-phone/sam-extension/extension.component.ts |
Removes unused imports. |
src/ui-kit/form-templates/international-phone/international.spec.ts |
Removes unused catch bindings. |
src/ui-kit/form-templates/international-phone/international.component.ts |
Removes an unused subscription value. |
src/ui-kit/form-controls/upload/upload.component.ts |
Removes an unused catch binding. |
src/ui-kit/form-controls/upload-v2/upload-v2.component.ts |
Cleans catch and constant bindings. |
src/ui-kit/form-controls/toggle-switch/toggle-switch.spec.ts |
Cleans imports and callbacks. |
src/ui-kit/form-controls/toggle-switch/toggle-switch.component.ts |
Cleans imports and declarations. |
src/ui-kit/form-controls/time/time.spec.ts |
Cleans catch and callback bindings. |
src/ui-kit/form-controls/time/time.component.ts |
Removes unused imports. |
src/ui-kit/form-controls/textarea/textarea.spec.ts |
Cleans imports and callbacks. |
src/ui-kit/form-controls/textarea/textarea.component.ts |
Cleans callbacks and constants. |
src/ui-kit/form-controls/text/text.spec.ts |
Removes an unused callback argument. |
src/ui-kit/form-controls/text/text.component.ts |
Simplifies a default callback. |
src/ui-kit/form-controls/select/select.spec.ts |
Cleans callback and catch bindings. |
src/ui-kit/form-controls/select/select.component.ts |
Removes an unused no-op. |
src/ui-kit/form-controls/sam-sds-autocomplete/selected-result/selected-result.component.ts |
Cleans callbacks and constants. |
src/ui-kit/form-controls/sam-sds-autocomplete/selected-result/selected-result.component.spec.ts |
Converts test bindings to constants. |
src/ui-kit/form-controls/sam-sds-autocomplete/selected-result/models/sds-selected-item-model-helper.ts |
Makes a lookup constant. |
src/ui-kit/form-controls/sam-sds-autocomplete/autocomplete/autocomplete.component.ts |
Removes a parameter still passed by template bindings. |
src/ui-kit/form-controls/sam-sds-autocomplete/autocomplete/autocomplete.component.spec.ts |
Cleans imports and constants. |
src/ui-kit/form-controls/sam-sds-autocomplete/autocomplete-search/autocomplete-search.component.ts |
Removes handler parameters still required by templates and tests. |
src/ui-kit/form-controls/sam-sds-autocomplete/autocomplete-search/autocomplete-search.component.spec.ts |
Removes unused values and uses constants. |
src/ui-kit/form-controls/sam-sds-autocomplete/autocomplete-search/autocomplete-seach-test-service.spec.ts |
Converts service bindings to constants. |
src/ui-kit/form-controls/sam-form-control/sam-form-control.ts |
Removes unused observer parameters. |
src/ui-kit/form-controls/radiobutton/radiobutton.spec.ts |
Removes an unused catch binding. |
src/ui-kit/form-controls/radiobutton/radiobutton.component.ts |
Removes unused forms dependencies. |
src/ui-kit/form-controls/number/number.spec.ts |
Cleans a callback argument. |
src/ui-kit/form-controls/date/date.spec.ts |
Removes an unused catch binding. |
src/ui-kit/form-controls/date/date.component.ts |
Removes handler parameters still required by templates and tests. |
src/ui-kit/form-controls/date-time/date-time.component.ts |
Removes unused output imports. |
src/ui-kit/form-controls/date-range/date-range.spec.ts |
Cleans a callback argument. |
src/ui-kit/form-controls/date-range/date-range.component.ts |
Removes an unused validation object. |
src/ui-kit/form-controls/checkbox/index.ts |
Removes an unused type import. |
src/ui-kit/form-controls/checkbox/checkbox.component.ts |
Simplifies a default callback. |
src/ui-kit/form-controls/autocomplete/autocomplete.spec.ts |
Cleans a callback argument. |
src/ui-kit/form-controls/autocomplete/autocomplete.service.ts |
Narrows signatures still used by three-argument callers. |
src/ui-kit/form-controls/autocomplete/autocomplete.component.ts |
Removes callback parameters still passed by production callers. |
src/ui-kit/form-controls/autocomplete-multiselect/autocomplete-multiselect.spec.ts |
Cleans a callback argument. |
src/ui-kit/form-controls/autocomplete-multiselect/autocomplete-multiselect.component.ts |
Removes a handler parameter still passed by template bindings. |
src/ui-kit/experimental/video-player/video-player.component.ts |
Removes an event parameter still required by metadata and tests. |
src/ui-kit/experimental/title/title.component.ts |
Cleans imports and declarations. |
src/ui-kit/experimental/tabs/tab-header.ts |
Cleans imports and position bindings. |
src/ui-kit/experimental/tabs/tab-group.ts |
Makes the selected index constant. |
src/ui-kit/experimental/sideNavigationToolbar/sideNavigationToolbar/sideNavigationToolbar.component.ts |
Removes unused Angular imports. |
src/ui-kit/experimental/segment/segment.component.ts |
Removes an unused input import. |
src/ui-kit/experimental/search/search.service.ts |
Converts search bindings to constants. |
src/ui-kit/experimental/search/search.component.ts |
Cleans imports and constants. |
src/ui-kit/experimental/picker/popover.ts |
Removes an unused view import. |
src/ui-kit/experimental/picker/picker.ts |
Removes a callback parameter still passed by its caller. |
src/ui-kit/experimental/patterns/layout/components/sidenav/sidenav.ts |
Converts stable declarations to constants. |
src/ui-kit/experimental/patterns/layout/components/main.component.ts |
Removes an unused event value. |
src/ui-kit/experimental/patterns/layout/components/actionbar.component.ts |
Removes callback parameters still passed by subscriptions. |
src/ui-kit/experimental/patterns/layout/architecture/update/reducer.ts |
Removes an unused store import. |
src/ui-kit/experimental/listbox/listbox.component.ts |
Cleans callbacks and constants. |
src/ui-kit/experimental/input-mask/input-mask.spec.ts |
Removes unused test setup. |
src/ui-kit/experimental/input-mask/input-mask.component.ts |
Removes an unused interface import. |
src/ui-kit/experimental/icon/icon.component.ts |
Removes unused icon types. |
src/ui-kit/experimental/hierarchical/selected-result/selected-result.component.ts |
Cleans imports and callbacks. |
src/ui-kit/experimental/hierarchical/selected-result/selected-result.component.spec.ts |
Makes a test item constant. |
src/ui-kit/experimental/hierarchical/hierarchical/hierarchical.component.ts |
Cleans imports and callbacks. |
src/ui-kit/experimental/hierarchical/hierarchical-tree/hierarchical-tree.component.ts |
Cleans types, subscriptions, and constants. |
src/ui-kit/experimental/hierarchical/hierarchical-tree/hierarchical-tree.component.spec.ts |
Cleans imports and constants. |
src/ui-kit/experimental/hierarchical/hierarchical-tree-selectedItem.model.ts |
Makes an item lookup constant. |
src/ui-kit/experimental/hierarchical/hierarchical-tree-header/hierarchical-tree-header.component.ts |
Removes an event parameter still required by template and test callers. |
src/ui-kit/experimental/hierarchical/hierarchical-tree-header/hierarchical-tree-header.component.spec.ts |
Makes configuration constant. |
src/ui-kit/experimental/hierarchical/hierarchical-tree-grid/hierarchical-tree-grid.component.ts |
Makes scroll metrics constant. |
src/ui-kit/experimental/hierarchical/hierarchical-tree-grid/hierarchical-tree-grid.component.spec.ts |
Cleans imports and constants. |
src/ui-kit/experimental/hierarchical/hierarchical-test-service.spec.ts |
Converts service bindings to constants. |
src/ui-kit/experimental/hierarchical/autocomplete/autocomplete.component.ts |
Removes an event parameter still passed by template bindings. |
src/ui-kit/experimental/date-range-v2/datepicker/calendar.spec.ts |
Cleans imports and constants. |
src/ui-kit/experimental/date-range-v2/date-range-v2.component.ts |
Removes unused outputs and callback arguments. |
src/ui-kit/experimental/date-range-v2/date-range-v2.component.spec.ts |
Removes unused test imports. |
src/ui-kit/experimental/aria/utils/events.ts |
Removes unused tuple values. |
src/ui-kit/experimental/aria/abstract-grid/abstract-grid.ts |
Removes unused callback values. |
src/ui-kit/experimental/aria/abstract-combobox/abstract-combobox.ts |
Cleans imports and event values. |
src/ui-kit/experimental/alert/alert.component.ts |
Removes unused output imports. |
src/ui-kit/experimental/actions-list/actions-list.component.ts |
Converts declarations to constants. |
src/ui-kit/elements/button/button.spec.ts |
Removes an unused async helper. |
src/ui-kit/directives/tab-outside/taboutside.spec.ts |
Removes unused testing helpers. |
src/ui-kit/directives/sticky/sticky.spec.ts |
Removes unused test state. |
src/ui-kit/directives/sticky/sticky.component.ts |
Removes handler parameters still passed by existing specs. |
src/ui-kit/directives/focus/focus.spec.ts |
Removes unused directive setup. |
src/ui-kit/directives/external-link/external-link.spec.ts |
Cleans imports, state, and constants. |
src/ui-kit/directives/drag-drop/drag-drop.directive.ts |
Narrows a public handler still called with drag events. |
src/ui-kit/directives/click-outside/click-outside.spec.ts |
Removes unused directive setup. |
src/ui-kit/components/tabs/tabs.spec.ts |
Removes an unused query import. |
src/ui-kit/components/spinner/spinner.spec.ts |
Removes unused fixture state. |
src/ui-kit/components/sidenav/sidenav/sidenav.spec.ts |
Removes unused test imports. |
src/ui-kit/components/sidenav/services/sidenav.service.ts |
Removes an unused Observable import. |
src/ui-kit/components/sidenav/menu-item/menu-item.spec.ts |
Cleans imports, state, and constants. |
src/ui-kit/components/point-of-contact/point-of-contact.spec.ts |
Removes unused testing helpers. |
src/ui-kit/components/pagination/pagination.spec.ts |
Cleans helpers and constants. |
src/ui-kit/components/pagination/pagination.component.ts |
Modernizes declarations. |
src/ui-kit/components/page-title/page-title.component.ts |
Removes an unused host-binding import. |
src/ui-kit/components/multiselect-dropdown/multiselect-dropdown.spec.ts |
Removes an unused module import. |
src/ui-kit/components/modal/modal.component.ts |
Makes focus references constant. |
src/ui-kit/components/image/image.component.ts |
Removes unused stream values. |
src/ui-kit/components/history/history.spec.ts |
Removes an unused async helper. |
src/ui-kit/components/header/header.component.spec.ts |
Removes unused component state. |
src/ui-kit/components/header-next/header.component.ts |
Removes a resize event parameter. |
src/ui-kit/components/footer-next/footer-nav-item.component.ts |
Removes an unused host import. |
src/ui-kit/components/download/download.spec.ts |
Removes an unused debug type. |
src/ui-kit/components/data-table/data-table.component.ts |
Removes unused imports and stub code. |
src/ui-kit/components/data-table/data-source.sample.spec.ts |
Removes an unused RxJS import. |
src/ui-kit/components/comments/comments.spec.ts |
Cleans imports, state, and declarations. |
src/ui-kit/components/comments/comments.service.ts |
Narrows service methods still called with comment payloads. |
src/ui-kit/components/comments/comments.module.ts |
Removes an unused service import. |
src/ui-kit/components/comments/comments.component.ts |
Cleans imports and stream parameters. |
src/ui-kit/components/comments/comment/comment.spec.ts |
Removes an unused module import. |
src/ui-kit/components/comments/comment/comment.component.ts |
Removes an unused click parameter. |
src/ui-kit/components/breadcrumbs/breadcrumbs.spec.ts |
Removes unused router and RxJS imports. |
src/ui-kit/components/breadcrumbs/breadcrumbs.component.ts |
Removes unused router imports. |
src/ui-kit/components/banner/banner.spec.ts |
Removes an unused query import. |
src/ui-kit/components/alert/alert.spec.ts |
Removes an unused changes type. |
src/ui-kit/components/alert-footer/alert-footer.spec.ts |
Removes unused imports and state. |
src/ui-kit/components/alert-footer/alert-footer.service.ts |
Removes an unused component import. |
src/ui-kit/components/actions/actions-dropdown/actions-dropdown.spec.ts |
Makes event fixtures constant. |
src/ui-kit/components/actions/actions-dropdown/actions-dropdown.component.ts |
Removes a handler parameter still passed by template bindings. |
src/ui-kit/components/actions/action-button/action-button.component.ts |
Removes an unused lifecycle import. |
src/ui-kit/components/accordion/accordion.spec.ts |
Removes unused test declarations. |
src/formly/components/autocomplete/test.service.ts |
Removes an unused fetch parameter. |
src/formly/components/autocomplete/autocomplete.component.ts |
Removes an unused service import. |
eslint.config.mjs |
Promotes both cleaned lint rules to errors. |
eslint-baseline.json |
Lowers the root warning ceiling. |
Review details
Suppressed comments (8)
src/ui-kit/components/comments/comments.service.ts:30
- The component still passes the new comment to
postCommentand the selected comment todeleteComment(comments.component.ts:113,134). Removing both parameters causes TS2554 and prevents implementations of this exported service from receiving those payloads; keep the contract while explicitly consuming values in the no-op default.
postComment(): Observable<Comment[]> {
return of(this._comments);
}
deleteComment(): Observable<Comment[]> {
src/ui-kit/directives/sticky/sticky.component.ts:48
- The existing spec calls
scroll(undefined), which no longer matches this zero-argument public signature. Keep and explicitly consume the event parameter so the test and downstream typed calls remain valid.
src/ui-kit/experimental/patterns/layout/components/actionbar.component.ts:49 - The subscription at line 34 still calls
_onUnitsChange(evt), so removing this parameter makes the production source fail type checking with TS2554. Preserve the callback signature and explicitly consume the unused value.
src/ui-kit/form-controls/autocomplete/autocomplete.component.ts:781 - The component template and three existing specs still call
checkForFocuswith an event. Narrowing this public handler to zero arguments creates template/direct-call arity errors; preserve and explicitly consume the parameter.
src/ui-kit/form-controls/date/date.component.ts:380 - The template and existing specs still pass an event to
onDayBlur. Retain and explicitly consume the parameter so the component continues to type-check.
src/ui-kit/form-controls/date/date.component.ts:458 - The template and several existing specs still invoke
onYearBlurwith an argument. This narrowed signature causes an arity error; retain and explicitly consume the event.
src/ui-kit/form-controls/sam-sds-autocomplete/autocomplete-search/autocomplete-search.component.ts:229 - The template and existing spec still invoke
clickOutSide($event). Keep and explicitly consume the event parameter to prevent an arity mismatch.
src/ui-kit/form-controls/sam-sds-autocomplete/autocomplete-search/autocomplete-search.component.ts:289 - The keypress binding and existing specs pass an event to this public method. The zero-argument signature breaks those typed invocations; retain and explicitly consume the parameter.
- Files reviewed: 161/161 changed files
- Comments generated: 17
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Address Copilot review feedback on PR #686: several handlers/service methods had their parameters removed entirely, but those parameters are still required by: - Angular templates that bind an argument (e.g. `(clickOutside)="hideActions($event)"`) - Existing spec call sites passing explicit arguments - Exported service/validator contracts (Angular's `Validator` interface, `ControlValueAccessor`) that downstream consumers may implement or call Restored each parameter (kept optional where the call was previously zero-arg-callable) and explicitly consumed it with a `void param;` statement so the parameter satisfies both the caller's arity and @typescript-eslint/no-unused-vars (which has no argsIgnorePattern in this repo's config, so a leading underscore alone does not suppress the rule). Affected: actions-dropdown, comments.service, drag-drop.directive, sticky.component, hierarchical/autocomplete.component, hierarchical-tree-header.component, actionbar.component, picker.ts, video-player.component, autocomplete-multiselect.component, form-controls/autocomplete.component, autocomplete.service, date.component, sam-sds-autocomplete/autocomplete-search.component, sam-sds-autocomplete/autocomplete.component, name-entry.component. Verified: `npx tsc --noEmit` reports zero TS2554/TS2416 arity errors across both tsconfig.json (root) and test-app's tsconfig, `npm run lint`/`lint:baseline` pass at 1031 warnings (unchanged from the previous baseline — these fixes were warning-neutral), `npm --prefix test-app test` passes (152 files / 1386 tests), `npm run validate:publish` passes. Addresses review comments from copilot-pull-request-reviewer[bot] on #686. Part of #585.
fpigeonjr
marked this pull request as ready for review
September 3, 2026 19:38
…d-declarations-and-const-related-lint-debt # Conflicts: # eslint-baseline.json # src/ui-kit/components/data-table/data-table.component.ts # src/ui-kit/form-templates/name-entry/name-entry.spec.ts
…d-declarations-and-const-related-lint-debt # Conflicts: # eslint-baseline.json # src/ui-kit/components/comments/comments.component.ts # src/ui-kit/experimental/alert/alert.component.ts # src/ui-kit/experimental/hierarchical/autocomplete/autocomplete.component.ts # src/ui-kit/experimental/hierarchical/hierarchical-test-service.spec.ts # src/ui-kit/experimental/listbox/listbox.component.ts # src/ui-kit/experimental/sideNavigationToolbar/sideNavigationToolbar/sideNavigationToolbar.component.ts # src/ui-kit/form-controls/autocomplete-multiselect/autocomplete-multiselect.component.ts # src/ui-kit/form-controls/sam-sds-autocomplete/autocomplete-search/autocomplete-search.component.ts # src/ui-kit/form-templates/international-phone/sam-extension/extension.component.ts # src/ui-kit/layout-deprecated/page.spec.ts # src/ui-kit/layout/pagination/pagination.component.spec.ts
…d-declarations-and-const-related-lint-debt # Conflicts: # eslint-baseline.json # src/formly/components/autocomplete/test.service.ts # src/ui-kit/directives/click-outside/click-outside.spec.ts # src/ui-kit/directives/focus/focus.spec.ts # src/ui-kit/directives/sticky/sticky.component.ts # src/ui-kit/directives/sticky/sticky.spec.ts # src/ui-kit/directives/tab-outside/taboutside.spec.ts # src/ui-kit/elements/button/button.spec.ts # src/ui-kit/layout/toolbar/toolbar.spec.ts # src/ui-kit/wrappers/fieldset-wrapper/fieldset-wrapper.component.ts
fpigeonjr
force-pushed
the
gh-585-remove-unused-declarations-and-const-related-lint-debt
branch
from
September 10, 2026 18:43
ccde018 to
6cf896e
Compare
beverly-n
approved these changes
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Removes the
@typescript-eslint/no-unused-varsandprefer-constlint debt across the library (root workspace), then promotes both rules fromwarntoerrorand lowers the warning baseline to reflect the cleanup.Scope of the cleanup (161 files):
@HostListener,ControlValueAccessor.registerOnChange) but genuinely unused, it was dropped from the signature entirely rather than underscore-prefixed — this project's ESLint config has noargsIgnorePattern/varsIgnorePattern, so a leading underscore does not suppress the warning here (verified via a scratch reproduction before starting the batch work).let/vardeclarations toconst(including a few strayvarloop counters converted tolet/constpairs).standalone: falseline while removing an unused import from the same@Component/@Directivedecorator block — these were caught by full-suite test failures (TestBed.configureTestingModulerejecting a standalone component in adeclarationsarray) and restored.Config changes:
eslint.config.mjs: promotedprefer-constand@typescript-eslint/no-unused-varsfromwarntoerror, since both rules now have zero occurrences across the codebase.eslint-baseline.json: root warning ceiling lowered from1619to1031vianpm run lint:baseline:bump, reflecting the ~590 warnings removed by this cleanup.test-app's baseline (4) is untouched — none of its warnings come from the two target rules.No behavior changes are intended; this is a pure dead-code/const-conversion refactor over existing, tested code. No new specs were added — the existing spec suite (and full test-app suite) serves as the regression oracle.
Motivation and Context
Closes #585
Type of Change (Select One and Apply Label)
bugfixlabelenhancementlabelbreakinglabelmaintenancelabelHow to Test
npm ci && npm ci --prefix test-appnpm run format:check— expect passnpm run lint— expect 0 errors, 1031 warnings (at/below the lowered baseline)npm run lint:baseline— expect✓ root: 1031 warnings (baseline 1031), 0 errors. Lint baseline gate passed.cd test-app && npm run lint— expect 0 errors, 4 pre-existing warnings (unaffected, unrelated rules)cd test-app && npm test— expect all specs green (152 files / 1386 tests)cd test-app && npm run build— expect a clean Angular buildnpm run validate:publish— expect all packed files, trackedsrc/ui-kitfiles, and consumer deep imports verified intactExpected result: All commands above exit 0.
no-unused-varsandprefer-constreport zero warnings anywhere in the root workspace; both rules are nowerror-level ineslint.config.mjs, so any regression will failnpm run lintimmediately rather than silently inflating the warning count.Screenshots (if appropriate)
N/A — backend/logic and lint-config changes only, no visual changes.
Checklist
gh-<number>-<slug>)format:checkpasses (npm run format:check)lintpasses (npm run lint)buildpasses (cd test-app && npm run build)cd test-app && npm test)