microsoft / microsoft/DefinitelyTyped-tools

Error: Since this type definition includes a header (a comment starting with `// Type definitions for`), assumed this was a DefinitelyTyped package.

Open
#758 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
423
Forks
237
Avg merge
18h 18m
Merged PRs (30d)
11

Description

When upgrading @definitelytyped/dtslint from 0.0.182 to 0.0.183, I am getting the dtslint error:

dtslint@0.0.183
Error: Since this type definition includes a header (a comment starting with `// Type definitions for`), assumed this was a DefinitelyTyped package.
But it is not in a `DefinitelyTyped/types/xxx` directory: /home/runner/work/html-react-parser/html-react-parser
    at assertPathIsInDefinitelyTyped (/home/runner/work/html-react-parser/html-react-parser/node_modules/@definitelytyped/dtslint/dist/index.js:186:15)
    at runTests (/home/runner/work/html-react-parser/html-react-parser/node_modules/@definitelytyped/dtslint/dist/index.js:119:5)
    at main (/home/runner/work/html-react-parser/html-react-parser/node_modules/@definitelytyped/dtslint/dist/index.js:79:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

See https://github.com/remarkablemark/html-react-parser/pull/1093

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with packages/dtslint and reproduce the failure from the html-react-parser upgrade described in PR #1093. Read the call path around dist/index.js, especially assertPathIsInDefinitelyTyped and runTests. Done means non-DefinitelyTyped packages with the shown header no longer fail incorrectly while genuine DefinitelyTyped path checks remain intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing-qa, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.