typescript - 尝试在新的 Definitely Typed 定义上运行 lint 时出错
我正在尝试为 Definitely Typed 提交一些新的类型定义,所以我正在按照这里的指南操作:
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/.github/PULL_REQUEST_TEMPLATE.md
但是代码检查器在我面前出问题了。
我尝试使用此命令创建一个全新的测试包:
npx dts-gen --dt --name test --template module
然后我用这个对它运行了 linter:
npm run lint test
当我那样做时,我收到错误:
Error: Expected `"strictFunctionTypes": true` or `"strictFunctionTypes": false`.
at Object.<anonymous> (/usr/local/lib/node_modules/dtslint/bin/checks.js:95:23)
at Generator.next (<anonymous>)
at fulfilled (/usr/local/lib/node_modules/dtslint/bin/checks.js:4:58)
答案#1
尝试不同于 test 的名称,npx dts-gen --dt --name xxxx --template module 看起来没问题 :)