feat: add TSCONFIG_RISK doctor rule #712
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
新增
TSCONFIG_RISK
doctor 规则,用于检查 tsconfig.json 配置中存在的风险,目前支持检测如下风险:compilerOptions.declaration
启用时,如果配置了include
且没有包含任何 bundless 构建的源文件,则认定为存在.d.ts
产物缺失风险,会进行报错动机:主要是为了消除 #704 带来的负面影响,答疑中碰到了有项目的
include
配置项里包含源码目录,但又在消费.d.ts
产物的情况,升级到 4.3.3 后会出现.d.ts
产物缺失,所以利用 doctor 规则做一层拦截