Skip to content

Conversation

Planeshifter
Copy link
Member

Description

What is the purpose of this pull request?

This pull request:

  • adds tsdoc-doctest ESLint rule for for linting return annotations in TSDoc example code inside of TypeScript declaration files.

Related Issues

Does this pull request have any related issues?

This pull request:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.


@stdlib-js/reviewers

@Planeshifter Planeshifter changed the title [WIP] build: add tsdoc-doctest ESLint rule build: add tsdoc-doctest ESLint rule Sep 16, 2025
@Planeshifter Planeshifter force-pushed the philipp/add-typescript-doctest-linting branch from 15a3eab to f723627 Compare September 16, 2025 16:47
@Planeshifter Planeshifter marked this pull request as ready for review September 17, 2025 06:39
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Sep 17, 2025
@Planeshifter Planeshifter requested a review from kgryte September 17, 2025 06:39
@kgryte kgryte added the Tools Issue or pull request related to project tooling. label Sep 17, 2025
Copy link
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

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

Only a few comments remain wrt the main implementation.

@kgryte kgryte added Needs Changes Pull request which needs changes before being merged. and removed Needs Review A pull request which needs code review. labels Sep 29, 2025
@kgryte
Copy link
Member

kgryte commented Oct 14, 2025

/stdlib merge

@stdlib-bot stdlib-bot added the bot: In Progress Pull request is currently awaiting automation. label Oct 14, 2025
@stdlib-bot stdlib-bot removed the bot: In Progress Pull request is currently awaiting automation. label Oct 14, 2025
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
@Planeshifter Planeshifter requested a review from kgryte October 20, 2025 05:02
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Oct 20, 2025
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: passed
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
debug( 'Could not load implementation: ' + implPath + '. Error: ' + pkg.message );
report( DEFAULT_ERROR_LOC, 'Could not load implementation: '+implPath+' ('+pkg.message+').' );
return;
}
Copy link

Choose a reason for hiding this comment

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

Bug: TSDoc Rule Fails to Skip Missing Modules

The tsdoc-declarations-doctest rule reports errors when it cannot resolve the implementation path or load the associated module. This behavior differs from the documentation, which indicates the rule should skip validation in these cases.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Changes Pull request which needs changes before being merged. Needs Review A pull request which needs code review. Tools Issue or pull request related to project tooling. TypeScript Issue involves or relates to TypeScript.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC]: add support for doctesting in TypeScript declaration files

3 participants