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: support react 16 lint #46963

Merged
merged 6 commits into from
Jan 14, 2024
Merged

feat: support react 16 lint #46963

merged 6 commits into from
Jan 14, 2024

Conversation

crazyair
Copy link
Member

@crazyair crazyair commented Jan 13, 2024

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

因 5.13.0版本导致 Checkbox.Group 在 react 16 版本下有 ts 报错,现增加 react 16/17 环境 antd 组建是否有 ts 错误

📝 Changelog

Language Changelog
🇺🇸 English support react 16 lint
🇨🇳 Chinese 支持 react 16 检验

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

Copy link

stackblitz bot commented Jan 13, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
Contributor

github-actions bot commented Jan 13, 2024

Visual Regression Report for PR #46963 Passed ✅

Target branch: master (c50f6f6)


Congrats! No visual-regression diff found

Copy link
Contributor

github-actions bot commented Jan 13, 2024

Preview Is ready

Copy link
Contributor

github-actions bot commented Jan 13, 2024

size-limit report 📦

Path Size
./dist/antd.min.js 331.04 KB
./dist/antd-with-locales.min.js 376.97 KB

Copy link

codesandbox-ci bot commented Jan 13, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit bc6419e:

Sandbox Source
antd reproduction template (forked) Configuration

Copy link

codecov bot commented Jan 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (78de319) 100.00% compared to head (bc6419e) 100.00%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #46963   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          732       732           
  Lines        12548     12548           
  Branches      3291      3291           
=========================================
  Hits         12548     12548           

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

@@ -2,9 +2,9 @@ import React from 'react';
import { PoweroffOutlined } from '@ant-design/icons';
import { Button, Flex } from 'antd';

const Text1 = () => '部署';
const Text1 = () => <>部署</>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为啥改成 <>,字符串有啥问题吗?

Copy link
Member Author

@crazyair crazyair Jan 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个在执行 npm add @types/react@16 安装 16 的类型后,这地方有报错,所以改的
image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原来如此

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里改了就没意义了,建议直接加 ignore

Copy link
Member Author

@crazyair crazyair Jan 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里是故意用组件+返回 string 放到 Button 下面的?可以这样用吗

<Button>
    部署
</Button>

@afc163
Copy link
Member

afc163 commented Jan 14, 2024

请完善一下内容。

图片

@crazyair
Copy link
Member Author

crazyair commented Jan 14, 2024

好了,这个不是改组建,不用发版,改的是 ci lint

@afc163
Copy link
Member

afc163 commented Jan 14, 2024

Background and solution 写一下?未来才容易找到代码改动的原因

@crazyair
Copy link
Member Author

Background and solution 写一下?未来才容易找到代码改动的原因

补充了

@afc163 afc163 merged commit 7e877dc into master Jan 14, 2024
127 checks passed
@afc163 afc163 deleted the support-react-16-lint branch January 14, 2024 09:15
Copy link
Contributor

🎉 Thank you for your contribution! If you have not yet joined our DingTalk community group, please feel free to join us (when joining, please provide the link to this PR).

🎉 感谢您的贡献!如果您还没有加入钉钉社区群,请扫描下方二维码加入我们(加群时请提供此 PR 链接)。

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

4 participants