Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add TSCONFIG_RISK doctor rule #712

Merged
merged 5 commits into from
Sep 12, 2023
Merged

Conversation

PeachScript
Copy link
Member

@PeachScript PeachScript commented Sep 12, 2023

新增 TSCONFIG_RISK doctor 规则,用于检查 tsconfig.json 配置中存在的风险,目前支持检测如下风险:

  1. compilerOptions.declaration 启用时,如果配置了 include 且没有包含任何 bundless 构建的源文件,则认定为存在 .d.ts 产物缺失风险,会进行报错

动机:主要是为了消除 #704 带来的负面影响,答疑中碰到了有项目的 include 配置项里包含源码目录,但又在消费 .d.ts 产物的情况,升级到 4.3.3 后会出现 .d.ts 产物缺失,所以利用 doctor 规则做一层拦截

@codecov
Copy link

codecov bot commented Sep 12, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.05% 🎉

Comparison is base (3d6855e) 94.33% compared to head (3b662f7) 94.39%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #712      +/-   ##
==========================================
+ Coverage   94.33%   94.39%   +0.05%     
==========================================
  Files          54       55       +1     
  Lines        1535     1551      +16     
  Branches      365      369       +4     
==========================================
+ Hits         1448     1464      +16     
  Misses         87       87              
Files Changed Coverage Δ
src/builder/bundless/dts/index.ts 98.63% <100.00%> (+0.05%) ⬆️
src/doctor/rules/TSCONFIG_RISK.ts 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@PeachScript PeachScript merged commit c694b1c into master Sep 12, 2023
9 checks passed
@delete-merged-branch delete-merged-branch bot deleted the feature/tsconfig-doctor-rule branch September 12, 2023 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant