Skip to content

chore: update eslint config#4279

Closed
RylanBot wants to merge 4 commits into
developfrom
rylan/chore/module
Closed

chore: update eslint config#4279
RylanBot wants to merge 4 commits into
developfrom
rylan/chore/module

Conversation

@RylanBot

Copy link
Copy Markdown
Collaborator

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

💡 需求背景和解决方案

📝 更新日志

  • 本条 PR 不需要纳入 Changelog

tdesign-react

@tdesign-react/chat

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

@RylanBot RylanBot added the WIP work in porgess label Jun 12, 2026
@tdesign-bot

tdesign-bot commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

TDesign Component Site Preview Open

Component Preview
tdesign-react 完成
@tdesign-react/chat 完成

{visible && (
<div className={prefixCls([blockName, 'control'])}>
<div className={prefixCls([blockName, 'title'])}>
{(() => {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Do not use immediately-invoked function expressions in JSX. IIFEs will not be optimized by React Compiler. (eslint@eslint-react/unsupported-syntax)

onDoubleClick={onCellDoubleClick}
onContextMenu={onCellRightClick}
>
{(() => {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

IIFEs ✖️

return labelText;
};

const RenderLabelContent = (node: TreeNode, cascaderContext: CascaderContextType) => {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Do not nest component definitions inside other components or props. Move it to the top level. (eslint@eslint-react/no-nested-component-definitions)

const vs = v as CheckboxOptionObj;
// CheckAll 的 checkBox 不存在 value,故用 checkAll_index 来保证尽量不和用户的 value 冲突.
return vs.checkAll ? (
<Checkbox {...vs} key={`checkAll_${index}`} indeterminate={indeterminate} />

@RylanBot RylanBot Jun 12, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Placing 'key' after spread props causes deoptimization when using the automatic JSX runtime. Put 'key' before any spread props. (eslint@eslint-react/jsx-no-key-after-spread)

@RylanBot RylanBot force-pushed the rylan/chore/module branch from 6b50e8a to 14c2e88 Compare June 12, 2026 08:16
Comment thread eslint.config.ts

import type { Linter } from 'eslint';

const eslintConfig: Linter.Config[] = [

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

迁移 Eslint 配置到最新的 10.x 版本

@pkg-pr-new

pkg-pr-new Bot commented Jun 12, 2026

Copy link
Copy Markdown
  • tdesign-react-demo

    npm i https://pkg.pr.new/Tencent/tdesign-react@4279
    
    npm i https://pkg.pr.new/Tencent/tdesign-react/@tdesign-react/chat@4279
    

commit: f360736

@RylanBot RylanBot closed this Jun 12, 2026
@RylanBot RylanBot deleted the rylan/chore/module branch June 12, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WIP work in porgess

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants