Error: Since this type definition includes a header (a comment starting with `// Type definitions for`), assumed this was a DefinitelyTyped package.
remarkablemark opened this issue · 6 comments
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)
Oh, eek, you're actually using this infra. We just did a huge refactor to make heavy use of pnpm and the header is now expected to be in package.json.
@jakebailey Thanks for the quick response! Do you have an example of what I can do to fix the header?
Probably just remove the headers entirely; but I haven't actually found the file with the header in your repo.
I'm more wondering what you're using dtslint
for, and if you'd be better served by tsd
or something.
I'm using dtslint
to type check my custom declaration files since it's a JavaScript repo. Would tsd
work better here?
If you're just looking for ExpectType
, probably, though I know that we have more lint rules that may be useful. But, those change based on DT's needs to I'm not totally sure how useful they are externally.
Thanks I'll take a look