Apply safe ESLint autofixes and lower the warning baseline - #675
Open
fpigeonjr wants to merge 2 commits into
Open
Apply safe ESLint autofixes and lower the warning baseline#675fpigeonjr wants to merge 2 commits into
fpigeonjr wants to merge 2 commits into
Conversation
Runs `ng lint --fix` (via direct ESLint invocation, with @angular-eslint/prefer-standalone temporarily disabled to avoid a behavior-changing false-positive fix — see rationale in PR) across both workspaces and locks the improvement in via lint:baseline:bump. - root warnings: 1619 -> 1307 - test-app warnings: 4 -> 3 - 0 lint errors in either workspace - full test-app suite remains green (1380/1380) - coverage and publish-validation gates unaffected Closes #582
There was a problem hiding this comment.
🟡 Changes recommended
The changes introduce at least one concrete functional/typing regression (data-table OnChanges<T> / dropped generic, listbox screen-reader label typo, and a directive host id binding that won’t update from the input).
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Applies ESLint “safe” autofixes across the raw-source Angular library (root src/) and the test-app workspace, and updates eslint-baseline.json to reflect the reduced warning counts as part of the lint-debt burn-down effort.
Changes:
- Mechanical ESLint autofixes (e.g.,
prefer-const,no-var, wrapper type fixes likeString→string/Object→object, and lifecycle-interface markers). - Minor Angular decorator cleanups (e.g., removing redundant
@Input("sameName")aliases). - Lowers
eslint-baseline.jsonto the new warning totals.
File summaries
| File | Description |
|---|---|
| test-app/src/typings.d.ts | Replaces var with let in an ambient declaration per no-var. |
| src/ui-kit/wrappers/label-wrapper/label-wrapper.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/wrappers/fieldset-wrapper/fieldset-wrapper.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/utilities/key-helper/key-helper.ts | prefer-const cleanup. |
| src/ui-kit/utilities/key-helper/key-helper.spec.ts | prefer-const cleanup in tests. |
| src/ui-kit/utilities/are-equal/are-equal.ts | prefer-const cleanup. |
| src/ui-kit/pipes/filesize/filesize.pipe.spec.ts | prefer-const cleanup in tests. |
| src/ui-kit/layout/toolbar/aside-toggle.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/layout/pagination/pagination.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/layout/pagination/pagination.component.spec.ts | prefer-const cleanup in tests. |
| src/ui-kit/layout/header/header.component.ts | prefer-const cleanup. |
| src/ui-kit/layout/header/header.component.spec.ts | prefer-const cleanup in tests. |
| src/ui-kit/layout/filter-drawer/dynamic-chips/dynamic-chips.directive.ts | prefer-const cleanup. |
| src/ui-kit/layout-deprecated/page.spec.ts | prefer-const cleanup in tests. |
| src/ui-kit/layout-deprecated/list-results-message.spec.ts | prefer-const cleanup in tests. |
| src/ui-kit/layout-deprecated/grid/row.spec.ts | prefer-const cleanup in tests. |
| src/ui-kit/layout-deprecated/grid/grid.spec.ts | prefer-const cleanup in tests. |
| src/ui-kit/layout-deprecated/grid/column.spec.ts | prefer-const cleanup in tests. |
| src/ui-kit/layout-deprecated/grid/column.directive.ts | prefer-const cleanup. |
| src/ui-kit/form-templates/phone-entry/phone-entry.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/form-templates/international-phone/sam-international-prefix/international-prefix.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/form-templates/international-phone/sam-extension/extension.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/form-service.ts | Replaces Subject<Object> with Subject<object>. |
| src/ui-kit/form-controls/upload-v2/upload-v2.component.ts | Adds lifecycle interface markers + prefer-const cleanup. |
| src/ui-kit/form-controls/toggle-switch/toggle-switch.component.ts | prefer-const cleanup. |
| src/ui-kit/form-controls/textarea/textarea.component.ts | Adds lifecycle interface markers + prefer-const cleanup. |
| src/ui-kit/form-controls/select/select.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/form-controls/sam-sds-autocomplete/selected-result/selected-result.component.ts | Wrapper-type fixes (Object→object) + prefer-const cleanups. |
| src/ui-kit/form-controls/sam-sds-autocomplete/selected-result/selected-result.component.spec.ts | prefer-const cleanup in tests. |
| src/ui-kit/form-controls/sam-sds-autocomplete/selected-result/models/sds-selected-item-model-helper.ts | prefer-const cleanup. |
| src/ui-kit/form-controls/sam-sds-autocomplete/autocomplete/autocomplete.component.spec.ts | prefer-const cleanup in tests. |
| src/ui-kit/form-controls/sam-sds-autocomplete/autocomplete-search/autocomplete-search.component.ts | Wrapper-type fixes + prefer-const cleanups. |
| src/ui-kit/form-controls/sam-sds-autocomplete/autocomplete-search/autocomplete-search.component.spec.ts | prefer-const cleanup in tests. |
| src/ui-kit/form-controls/sam-sds-autocomplete/autocomplete-search/autocomplete-seach-test-service.spec.ts | prefer-const cleanup + sample data made const. |
| src/ui-kit/form-controls/radiobutton/radiobutton.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/form-controls/number/number.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/form-controls/date/date.component.ts | Adds lifecycle interface markers + prefer-const cleanup. |
| src/ui-kit/form-controls/checkbox/checkbox.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/form-controls/autocomplete/autocomplete.component.ts | Adds lifecycle interface markers + prefer-const cleanups in loops/temps. |
| src/ui-kit/form-controls/autocomplete-multiselect/autocomplete-multiselect.component.ts | Adds lifecycle interface markers + prefer-const cleanups. |
| src/ui-kit/filters/filters.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/experimental/video-player/video-player.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/experimental/title/title.component.ts | prefer-const cleanup. |
| src/ui-kit/experimental/tabs/tab-nav-bar/tab-nav-bar.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/experimental/tabs/tab-group.ts | Adds lifecycle interface markers + prefer-const cleanup. |
| src/ui-kit/experimental/tabs/tab-body.ts | Removes redundant @Input("sameName") aliases. |
| src/ui-kit/experimental/sideNavigationToolbar/sideNavigationToolbar/sideNavigationToolbar.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/experimental/search/search.service.ts | prefer-const cleanup. |
| src/ui-kit/experimental/search/search.component.ts | Adds lifecycle interface markers + prefer-const cleanup. |
| src/ui-kit/experimental/patterns/layout/components/title-section.component.ts | Removes redundant @Input("id") alias. |
| src/ui-kit/experimental/patterns/layout/components/sidenav/sidenav.ts | prefer-const cleanup in loops/temps. |
| src/ui-kit/experimental/patterns/layout/components/page/page.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/experimental/patterns/layout/components/actionbar.component.ts | Adds lifecycle interface markers + import formatting. |
| src/ui-kit/experimental/listbox/listbox.component.ts | Adds lifecycle interface markers + prefer-const cleanup. |
| src/ui-kit/experimental/layout/layout.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/experimental/hierarchical/selected-result/selected-result.component.spec.ts | prefer-const cleanup in tests. |
| src/ui-kit/experimental/hierarchical/models/SamHierarchicalTreeHeaderConfiguration.ts | Wrapper-type fix (String→string). |
| src/ui-kit/experimental/hierarchical/models/SamHierarchicalTreeConfiguration.ts | Wrapper-type fix (String→string). |
| src/ui-kit/experimental/hierarchical/models/SamHierarchicalConfiguration.ts | Wrapper-type fix (String→string). |
| src/ui-kit/experimental/hierarchical/hierarchical-tree/hierarchical-tree.component.ts | Wrapper-type fixes + prefer-const cleanups. |
| src/ui-kit/experimental/hierarchical/hierarchical-tree/hierarchical-tree.component.spec.ts | prefer-const cleanup in tests. |
| src/ui-kit/experimental/hierarchical/hierarchical-tree-selectedItem.model.ts | prefer-const cleanup. |
| src/ui-kit/experimental/hierarchical/hierarchical-tree-header/hierarchical-tree-header.component.spec.ts | prefer-const cleanup in tests. |
| src/ui-kit/experimental/hierarchical/hierarchical-tree-grid/hierarchical-tree-grid.component.ts | Adds lifecycle interface markers + prefer-const cleanup. |
| src/ui-kit/experimental/hierarchical/hierarchical-tree-grid/hierarchical-tree-grid.component.spec.ts | prefer-const cleanup in tests. |
| src/ui-kit/experimental/hierarchical/hierarchical-test-service.spec.ts | prefer-const cleanup + sample data made const. |
| src/ui-kit/experimental/hierarchical/autocomplete/autocomplete.component.ts | Wrapper-type fixes + prefer-const cleanups. |
| src/ui-kit/experimental/dollar/dollar.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/experimental/date-range-v2/datepicker/picker.component.ts | Wrapper-type fix (String→string). |
| src/ui-kit/experimental/date-range-v2/datepicker/calendar.spec.ts | prefer-const cleanup in tests. |
| src/ui-kit/experimental/button-next/button.component.ts | Wrapper-type fix (String→string). |
| src/ui-kit/experimental/aria/utils/events.ts | Wrapper-type fix (Object→object). |
| src/ui-kit/experimental/aria/abstract-grid/abstract-grid.ts | Wrapper-type fix (Object→object). |
| src/ui-kit/experimental/aria/abstract-grid/abstract-cell.ts | Wrapper-type fix (Object→object). |
| src/ui-kit/experimental/aria/abstract-combobox/abstract-combobox.ts | Wrapper-type fixes (Object→object) in types and methods. |
| src/ui-kit/experimental/alert/alert.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/experimental/actions-list/actions-list.component.ts | Adds lifecycle interface markers + prefer-const cleanup. |
| src/ui-kit/elements/button/button.component.ts | Wrapper-type fix (String→string). |
| src/ui-kit/directives/sticky/sticky.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/directives/external-link/external-link.spec.ts | prefer-const cleanup in tests. |
| src/ui-kit/components/tabs/tabs.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/components/sidenav/sidenav/sidenav.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/components/sidenav/menu-item/menu-item.spec.ts | prefer-const cleanup in tests. |
| src/ui-kit/components/pagination/pagination.spec.ts | prefer-const cleanup in tests. |
| src/ui-kit/components/pagination/pagination.component.ts | no-var / prefer-const cleanups. |
| src/ui-kit/components/page-title/page-title.component.ts | Removes redundant @Input("id") alias. |
| src/ui-kit/components/modal/modal.component.ts | Adds lifecycle interface markers + prefer-const cleanups. |
| src/ui-kit/components/data-table/sort-header.component.ts | Removes redundant @Input("start") alias. |
| src/ui-kit/components/data-table/data-table.component.ts | Adds lifecycle interface marker (but introduces typing issue). |
| src/ui-kit/components/comments/comments.spec.ts | prefer-const cleanup in tests. |
| src/ui-kit/components/comments/comments.component.ts | Adds lifecycle interface marker to match existing hook. |
| src/ui-kit/components/alert/alert.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/components/alert-footer/alert-footer.component.ts | Adds lifecycle interface markers to match existing hooks. |
| src/ui-kit/components/actions/actions-dropdown/actions-dropdown.spec.ts | prefer-const cleanup in tests. |
| eslint-baseline.json | Lowers the ratcheting warning baseline counts. |
Review details
- Files reviewed: 94/95 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Copilot review caught three real defects introduced by the safe-fix pass: - data-table.component.ts: implements OnChanges<T> is invalid (OnChanges is not generic); restore the generic argument on _SamTable<T> instead and implement plain OnChanges. - listbox.component.ts: setHighlightedItem read item["lable"] (typo, pre-existing bug the autofix format-touched but didn't create) — fixed to item["label"] to match OptionModel. - title-section.component.ts: removing the @input("id") alias exposed that attrId was only ever initialized once from the field initializer, so it never tracked later updates to id; turned attrId into a getter so the attr.id host binding stays in sync with the id input. All three verified via tsc --noEmit; full test-app suite (1380 tests) still green.
fpigeonjr
marked this pull request as ready for review
September 2, 2026 19:55
fpigeonjr
added a commit
that referenced
this pull request
Sep 3, 2026
- Rebase branch tip onto latest #675 (gh-582) so this PR's diff/baseline reflect only #586's type-safety changes, not #675's still-open autofix set. #675 is CLEAN/MERGEABLE and independently reviewed; stacking is the documented convention for this repo's slice-based PRs. - Retarget PR base to gh-582-apply-safe-eslint-autofixes-and-lower-the-baseline so the GitHub diff matches (rebase alone doesn't move a PR's base). - Drop the #674 datepicker outside-click fix and #677 sidenav RxJS fix commits from this branch entirely (dropped during rebase) -- both are unrelated bugfixes already merged to master via their own PRs; they were only present here as inherited ancestry from an earlier base choice, not something this PR should carry or take credit for. - pagination.component.ts: options.value widened to 'string | number' -- the template already supports numeric option values via attribute binding; the prior 'any[]' allowed this and the fix's 'string' literal would have narrowed a supported case. - date-time-display.pipe.ts: transform() parameter widened to include 'undefined' explicitly -- the implementation's own guard branch handles undefined and the pipe previously accepted it; the stricter signature would have been a source-compatibility break for existing callers. - types.ts: HistoryNodeType.queryParams value type widened to include readonly arrays and null, matching Angular Router's actual accepted queryParams value shapes (repeated params, param removal) instead of the narrower 'string | number | boolean' which would reject valid existing usage.
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
Applies ESLint's safe automatic fixes to the root workspace and
test-app, then lowers the ratcheting warning baseline (eslint-baseline.json) to the new, reduced counts. This establishes a smaller, cleaner lint baseline ahead of the manual semantic-lint cleanup tracked in the parent issue.Fixes applied (root workspace):
prefer-const,@angular-eslint/use-lifecycle-interface,@typescript-eslint/no-wrapper-object-types,@angular-eslint/no-input-rename,no-var.@angular-eslint/prefer-standalone's autofix was excluded from this pass. It mechanically stripsstandalone: falsefrom@Componentdecorators, but every affected component in this codebase is still registered viadeclarationsin anNgModule(not imported asstandalone: true). Removing the flag flips Angular's default tostandalone: true, which is not a "safe" fix here — it brokeTestBed.configureTestingModulefor every spec that declares one of these components (827 failing tests when the raw--fixwas applied), and is a behavior change, not a style fix. It's left as warning debt for the parent epic (#580) to address deliberately, alongside the actual standalone migration.test-app's threeprefer-standalonewarnings onAppComponent/HomeComponent/TabsGalleryComponentare excluded for the same reason (they'redeclarationsinapp.module.ts).Motivation and Context
Closes #582
Type of Change (Select One and Apply Label)
bugfixlabelenhancementlabelbreakinglabelmaintenancelabelHow to Test
npm ci && npm ci --prefix test-appnpm run lint→ 0 errors, 1307 warnings (root)npm --prefix test-app run lint→ 0 errors, 3 warnings (test-app)npm --prefix test-app test→ 151 test files / 1380 tests passnpm run coverage:check→ passes (coverage unchanged by this PR)npm run format:check→ passesnpm run validate:publish→ passesExpected result: All lint/test/coverage/publish gates pass, and
eslint-baseline.jsonreflects the lowered warning counts (root: 1619 → 1307, test-app: 4 → 3).Screenshots (if appropriate)
N/A — no UI changes, mechanical lint autofixes only.
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)