Skip to content

Conversation

@brettz9
Copy link
Collaborator

@brettz9 brettz9 commented Oct 9, 2025

Builds on #1561 .

@brettz9 brettz9 requested a review from Copilot October 9, 2025 07:45
Copy link
Contributor

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 adds a new TypeScript-style ESLint rule ts-prefer-function-type that enforces using function types over call signatures when there are no other properties. It builds on existing work and includes comprehensive test coverage and documentation.

  • Adds ts-prefer-function-type rule to prefer function types over call signatures
  • Refactors common type rewiring logic into a shared utility function
  • Updates package dependencies for jsdoc-type-pratt-parser

Reviewed Changes

Copilot reviewed 16 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/rules/tsPreferFunctionType.js New rule implementation for preferring function types
src/jsdocUtils.js Extracted common type rewiring logic into rewireByParsedType utility
src/rules/typeFormatting.js Refactored to use the new shared type rewiring utility
test/rules/assertions/tsPreferFunctionType.js Comprehensive test cases for the new rule
docs/rules/ts-prefer-function-type.md Rule documentation
Various index files Rule registration and configuration
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

brettz9 and others added 2 commits October 9, 2025 15:47
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@brettz9 brettz9 closed this Oct 10, 2025
@brettz9 brettz9 deleted the ts-prefer-function-type branch October 10, 2025 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

1 participant