chore: update eslint config#4279
Closed
RylanBot wants to merge 4 commits into
Closed
Conversation
Collaborator
TDesign Component Site Preview Open
|
RylanBot
commented
Jun 12, 2026
| {visible && ( | ||
| <div className={prefixCls([blockName, 'control'])}> | ||
| <div className={prefixCls([blockName, 'title'])}> | ||
| {(() => { |
Collaborator
Author
There was a problem hiding this comment.
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} | ||
| > | ||
| {(() => { |
| return labelText; | ||
| }; | ||
|
|
||
| const RenderLabelContent = (node: TreeNode, cascaderContext: CascaderContextType) => { |
Collaborator
Author
There was a problem hiding this comment.
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} /> |
Collaborator
Author
There was a problem hiding this comment.
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)
6b50e8a to
14c2e88
Compare
RylanBot
commented
Jun 12, 2026
|
|
||
| import type { Linter } from 'eslint'; | ||
|
|
||
| const eslintConfig: Linter.Config[] = [ |
Collaborator
Author
There was a problem hiding this comment.
迁移 Eslint 配置到最新的 10.x 版本
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

🤔 这个 PR 的性质是?
🔗 相关 Issue
💡 需求背景和解决方案
📝 更新日志
tdesign-react
@tdesign-react/chat
☑️ 请求合并前的自查清单