Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
// Relax unused-variable checks to avoid false positives in test callbacks and mocks.
"noUnusedLocals": false,
"noUnusedParameters": false
}
}
Comment on lines +1 to +8

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 | Confidence: Medium

The new tsconfig.test.json disables noUnusedLocals and noUnusedParameters for all test files. While this prevents build failures from test-specific patterns (e.g., unused done callbacks), it also suppresses detection of genuinely dead code or unintentional unused variables and parameters across the entire test suite. Over time, this can lead to accumulation of unused code, reducing readability and potentially masking logic errors. The change lacks any documentation explaining why these checks are disabled, which hinders future maintainers. Since the decision is intentional and not a bug, the issue is a low-priority maintainability concern.

Code Suggestion:

{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    // Relax unused-variable checks to avoid false positives in test callbacks and mocks.
    "noUnusedLocals": false,
    "noUnusedParameters": false
  }
}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment to tsconfig.test.json explaining the rationale for disabling noUnusedLocals and noUnusedParameters.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have addressed the reviewer's feedback by adding the requested comment to tsconfig.test.json and replying to the comment. I have verified the change. No other feedback was provided.