Skip to content

Conversation

Xvezda
Copy link
Owner

@Xvezda Xvezda commented Jun 23, 2025

No description provided.

@Copilot Copilot AI review requested due to automatic review settings June 23, 2025 20:22
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses the "Fix setter type inference" bug by updating test cases and internal logic to accurately handle setter and getter distinctions during type inference for throw annotations.

  • Updated tests in no-undocumented-throws and check-throws-tag-type to verify correct error reporting for getters and setters
  • Modified getCalleeDeclaration in utils.js to properly identify setter declarations and adjusted no-undocumented-throws rule logic accordingly

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/rules/no-undocumented-throws.test.js Added test cases for getter/setter usage with expected throws documentation
tests/rules/check-throws-tag-type.test.js Updated tests to catch mismatches in documented throw types for setter/getter usage
src/utils.js Enhanced type inference by explicitly checking for setter declarations and removed redundant switch logic
src/rules/no-undocumented-throws.js Refined rule to exclude getter throw types in assignment contexts, focusing on setters

@Xvezda Xvezda force-pushed the feature/fix-setter-type-infer branch from c301290 to 9bbe355 Compare June 23, 2025 20:22
@Xvezda Xvezda merged commit 7c34b93 into master Jun 23, 2025
1 check passed
@Xvezda Xvezda deleted the feature/fix-setter-type-infer branch June 23, 2025 20:23
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.

1 participant