DYN-10448 Fix lint scripts in the DynamoHome repo#88
Open
danvelazco27 wants to merge 2 commits intoDynamoDS:masterfrom
Open
DYN-10448 Fix lint scripts in the DynamoHome repo#88danvelazco27 wants to merge 2 commits intoDynamoDS:masterfrom
danvelazco27 wants to merge 2 commits intoDynamoDS:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to make linting reliable/green across the repo by hardening ESLint/TS config and applying lint-driven typing/formatting fixes across source and tests.
Changes:
- Updated ESLint configuration and npm lint scripts to properly lint JS/TS/TSX and add TypeScript + React Hooks lint support.
- Expanded TypeScript project coverage (tsconfig + CSS module declarations) to reduce TS resolution errors.
- Remediated lint issues across components/tests via formatting, safer
unknowntypings, and targeted suppressions.
Reviewed changes
Copilot reviewed 37 out of 45 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| types/index.d.ts | Adds TS module declarations (incl. CSS). |
| tsconfig.json | Expands TS include set (now includes tests/types). |
| tests/unit/utility.test.ts | Replaces any with safer unknown cast. |
| tests/unit/SettingsContext.test.tsx | Replaces any with unknown + narrowing. |
| tests/unit/Samples/SamplesGrid.test.tsx | Removes any in mocked component props. |
| tests/unit/Samples/PageSamples.test.tsx | Tightens mock typing (unknown + cast). |
| tests/unit/Samples/CustomSampleFirstCellRenderer.test.tsx | Avoids any in FC cast. |
| tests/unit/Recent/PageRecent.test.tsx | Tightens mock component typing. |
| tests/unit/Recent/GraphTable.test.tsx | Uses unknown[] + explicit cast for render. |
| tests/unit/Recent/CustomNameCellRenderer.test.tsx | Avoids any spread via Record cast. |
| tests/unit/Learning/PageLearning.test.tsx | Adds ReactNode typing in mocks. |
| tests/unit/LayoutContainer.test.tsx | Adds ReactNode typing + safer mock props. |
| tests/unit/App.test.tsx | Adds ReactNode typing in SplitPane mock. |
| src/index.tsx | Formatting-only render indentation. |
| src/functions/utility.ts | Adds lint suppression around any parameter. |
| src/functions/placeholder.ts | Formatting-only switch indentation. |
| src/components/Sidebar/Sidebar.tsx | Formatting-only reindent + quotes consistency. |
| src/components/Sidebar/CustomDropDown.tsx | Lint-driven cleanup + suppressions. |
| src/components/SettingsContext.tsx | Formatting + suppressions for any context. |
| src/components/Samples/SamplesTable.tsx | Lint suppression + formatting changes. |
| src/components/Samples/SamplesGridItem.tsx | Formatting-only reindent. |
| src/components/Samples/SamplesGrid.tsx | Formatting + quote normalization. |
| src/components/Samples/PageSamples.tsx | Formatting + targeted lint suppressions. |
| src/components/Samples/CustomSampleFirstCellRenderer.tsx | Minor formatting + unused-var suppression. |
| src/components/Recent/PageRecent.tsx | Formatting + targeted lint suppressions. |
| src/components/Recent/GraphTable.tsx | Adds file-level disables + formatting. |
| src/components/Recent/GraphGridItem.tsx | Formatting + unused-var suppression. |
| src/components/Recent/CustomNameCellRenderer.tsx | Formatting-only quote normalization. |
| src/components/Recent/CustomLocationCellRenderer.tsx | Formatting-only quote normalization. |
| src/components/Recent/CustomAuthorCellRenderer.tsx | Formatting-only quote normalization. |
| src/components/MainContent.tsx | Formatting-only reindent + quote normalization. |
| src/components/Learning/VideoCarouselItem.tsx | Formatting + unused-var suppression. |
| src/components/Learning/PageLearning.tsx | Formatting + require-import suppressions. |
| src/components/Learning/ModalItem.tsx | Formatting-only reindent. |
| src/components/Learning/GuideGridItem.tsx | Formatting + unused-var suppression. |
| src/components/Learning/Carousel.tsx | Formatting + minor semicolon fixes. |
| src/components/LayoutContainer.tsx | Adds hook-deps suppressions + minor log string change. |
| src/components/Common/Tooltip.tsx | Formatting-only reindent. |
| src/components/Common/CardItem.tsx | Formatting-only reindent. |
| src/components/Common/Arrow.tsx | Formatting + prefer-const suppressions. |
| src/App.tsx | Quote normalization + formatting-only. |
| playwright.config.js | Adjusts local worker count. |
| package.json | Updates lint scripts; adds TS ESLint + react-hooks deps. |
| package-lock.json | Locks new lint/tooling dependencies. |
| .eslintrc | Adds TS parser/plugins, hooks rules, and TS overrides. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
avidit
approved these changes
Apr 30, 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.
PR Description
Summary
This PR focuses on making linting fully reliable and green across the codebase, while preserving runtime behavior.
It resolves previous ESLint execution/parsing issues, aligns TypeScript linting behavior, and applies the required code-level suppressions and type cleanups to reach a clean lint run.
What Changed
no-undeffor TS filesreact/prop-typesfor TS filesno-unused-varswith@typescript-eslint/no-unused-varsanyusages with saferunknown-based typing patterns.Outcome
npm run lint:checkpasses successfully on this branch.Scope / Impact
Validation Performed
no-undef,react/prop-types, andno-unused-varsbehavior in TS).