Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
330a005
chore: migrate to eslint flat config and prettier 3
liweijie0812 Oct 8, 2026
310876c
chore: upgrade stylelint to v17 and align with prettier
liweijie0812 Oct 8, 2026
7b50fbb
fix(td-doc-header): 修复 changelog 入口选择器错误
liweijie0812 Oct 8, 2026
96af099
chore: 统一 lint-staged 中 less 格式化并精简 prettier 集成
liweijie0812 Oct 8, 2026
b729d6f
chore: 清理 stylelint 存量错误并对齐 prettier 格式
liweijie0812 Oct 8, 2026
ea65591
chore: 对齐 tdesign-common 的 lint/test 脚本并治理 stylelint
liweijie0812 Oct 8, 2026
971ff07
refactor: 统一站点类名到 td- 前缀并消除 BEM 告警
liweijie0812 Oct 8, 2026
8b4f16f
fix(td-doc-header): 修复 changelog 入口选择器 id/class 不一致
liweijie0812 Oct 8, 2026
25dde4d
chore(spline): 移除已废弃的 spline 资源文件
liweijie0812 Oct 8, 2026
e674818
refactor: 移除已废弃的 spline 缩略图功能
liweijie0812 Oct 8, 2026
2f252cd
Merge remote-tracking branch 'origin/main' into chore/migrate-eslint-…
liweijie0812 Oct 8, 2026
73057f1
style: 将 rgb 颜色函数统一替换为 rgba
liweijie0812 Oct 8, 2026
ac51702
Revert "refactor: 移除已废弃的 spline 缩略图功能"
liweijie0812 Oct 8, 2026
2d611ac
revert: 还原 tdoc 目录类名为 tdesign-toc_*
liweijie0812 Oct 8, 2026
fdf1112
revert: 还原 971ff07 的 TDesign- 类名等改动
liweijie0812 Oct 8, 2026
ac1221d
fix: 恢复被误删的厂商前缀并补回强制断词
liweijie0812 Oct 8, 2026
776bfea
chore: 移除 eslint 配置中已不存在的 site/spline 忽略项
liweijie0812 Oct 8, 2026
28629d8
chore: 清理 eslint 配置中不存在的忽略项
liweijie0812 Oct 8, 2026
b0849f4
chore: 收紧 eslint 规则并清理冗余配置
liweijie0812 Oct 8, 2026
69ab662
chore: 引入 stylistic 规则并优化 eslint 配置
liweijie0812 Oct 8, 2026
530c621
chore: 使用 npm-run-all2 并行执行 lint 任务
liweijie0812 Oct 8, 2026
50f690f
fix: 修复评审提出的 5 处问题
liweijie0812 Oct 9, 2026
a1f1b96
chore: 优化 vscode 编辑器配置
liweijie0812 Oct 10, 2026
ad344e7
chore: 添加 yaml 文件格式化配置
liweijie0812 Oct 10, 2026
7dfe38a
chore: 移除 vscode 中重复的 jsx/tsx 格式化配置
liweijie0812 Oct 10, 2026
321fc2a
chore: 升级 lint 相关依赖并迁移 husky 9
liweijie0812 Oct 20, 2026
6fdeded
fix(husky): 修复 pre-commit 邮箱校验在 sh 下失效
liweijie0812 Oct 20, 2026
ddbfd30
Merge remote-tracking branch 'origin/main' into chore/migrate-eslint-…
liweijie0812 Oct 20, 2026
fb47fd7
Merge remote-tracking branch 'origin/main' into chore/migrate-eslint-…
liweijie0812 Oct 23, 2026
5a61ff5
style: 格式化 homepage 样式多值属性
liweijie0812 Oct 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .cnb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ $:
- docker
stages:
- name: install dependencies
script: pnpm install

script: pnpm install
14 changes: 0 additions & 14 deletions .eslintrc.js

This file was deleted.

4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.zh-CN.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: 反馈 Bug
description: 通过 github 模板进行 Bug 反馈。
title: "[组件名称] 描述问题的标题"
labels: [🐞 bug,🧐 unconfirmed]
title: '[组件名称] 描述问题的标题'
labels: [🐞 bug, 🧐 unconfirmed]
body:
- type: markdown
attributes:
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature-report.zh-CN.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: 反馈新功能
description: 通过 github 模板进行新功能反馈。
title: "[组件名称] 描述问题的标题"
labels: [💪🏻 enhancement,🧐 unconfirmed]
title: '[组件名称] 描述问题的标题'
labels: [💪🏻 enhancement, 🧐 unconfirmed]
body:
- type: markdown
attributes:
Expand Down
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/new-component.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ about: 新组件招募
title: ''
labels: ''
assignees: ''

---

<!--
参考样例:
issue label 需要设置为 help wanted,发起招募
-->
## 组件名称中英文

## 组件名称中英文

### 交互稿

<!--
需要给到 CoDesign 分享地址,不需要登录访问
-->

交互稿:

### 设计稿
Expand All @@ -42,4 +42,3 @@ issue label 需要设置为 help wanted,发起招募
详细提交过程请参考:[如何贡献](https://tdesign.tencent.com/about/contributing)。

欢迎填写[《贡献者加入意向收集》](https://wj.qq.com/s2/9772260/7cbe/)问卷加入 TDesign 贡献者群,参与过程中遇到的各类问题可以得到实时解答和指引。

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: ci

on:
pull_request:
branches: [ main]
branches: [main]
types: [opened, synchronize, reopened]

jobs:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/pkg-pr-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- run: pnpm --filter '@tdesign/site-components' --filter '@tdesign/theme-generator' run build

- run: pnpm dlx pkg-pr-new publish './packages/site-components' './packages/theme-generator'

build-tdesign-vue-site:
if: github.repository == 'Tencent/tdesign' && github.event_name == 'pull_request'
needs: build
Expand Down Expand Up @@ -278,14 +278,13 @@ jobs:

- run: pnpm uniapp build:npm

- run: pnpm -C packages/tdesign-uniapp/example build:h5 --mode preview
- run: pnpm -C packages/tdesign-uniapp/example build:h5 --mode preview

- uses: actions/upload-artifact@v7
with:
name: tdesign-uniapp-site
path: packages/tdesign-uniapp/site/dist
retention-days: 5

retention-days: 5

build-site:
if: github.repository == 'Tencent/tdesign' && github.event_name == 'pull_request'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/service-update-schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ name: service-update-schedule
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 5"
- cron: '0 0 * * 5'

jobs:
create-report:
# prevents this action from running on forks
if: github.repository == 'Tencent/tdesign'
if: github.repository == 'Tencent/tdesign'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ static_site
lib

## test
coverage
coverage

## lint cache
.eslintcache
.stylelintcache
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit "$1"
13 changes: 11 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npx lint-staged || exit $?

npx lint-staged && log_emails=$(git config user.email) && if [[ ${log_emails} =~ '@tencent.com' ]];then echo 本地提交邮箱 $log_emails 校验非法,需要本地更改重新提交 && exit 2;else echo 邮箱 $log_emails 校验通过;fi
log_emails=$(git config user.email)
case "$log_emails" in
*@tencent.com)
echo "本地提交邮箱 $log_emails 校验非法,需要本地更改重新提交"
exit 2
;;
*)
echo "邮箱 $log_emails 校验通过"
;;
esac
5 changes: 1 addition & 4 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"

npx czg --hook || true
npx czg --hook || true
11 changes: 11 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
node_modules
.pnpm-store

# build output
_site
dist
results
static_site
lib
coverage
_data
50 changes: 48 additions & 2 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,64 @@
module.exports = {
extends: ['stylelint-config-standard', 'stylelint-config-standard-less'],
overrides: [
{
files: ['**/*.vue'],
customSyntax: 'postcss-html',
},
{
// 内置主题 token 由 TDesign 设计平台导出并直接 import ?raw 使用,
// 保留其原始格式(百分比透明度等),不参与本地格式治理
files: ['**/themes/built-in/css/**/*.css'],
rules: {
'alpha-value-notation': null,
'custom-property-empty-line-before': null,
'no-duplicate-selectors': null,
},
},
],
rules: {
'number-leading-zero': 'never',
'color-function-notation': 'legacy',
'alpha-value-notation': 'number',
// TODO 后面统一改 class 小写 且 BEM,当前按警告提示
// 兼容 tdoc 插件(vite-plugin-tdoc)生成的固定目录类名 tdesign-toc_*
'selector-class-pattern': [
'^[a-z]+([-]?[a-z0-9]+)*(__[a-z0-9]([-]?[a-z0-9]+)*)?(--[a-z0-9]([-]?[a-z0-9]+)*)?$',
'^[a-z]+([-]?[a-z0-9]+)*(__[a-z0-9]([-]?[a-z0-9]+)*)?(--[a-z0-9]([-]?[a-z0-9]+)*)?$|^tdesign-toc_',
{
resolveNestedSelectors: true,
message: 'Expected class selector "%s" to be lowercase and BEM format',
severity: 'warning',
},
],
'media-feature-range-notation': 'prefix',
// 存量 less 中存在同优先级选择器靠书写顺序覆盖的写法,放开该规则以避免大规模重构引发样式回归;
// 该规则检查的是「低优先级选择器出现在高优先级之后」,与 Less 嵌套展开无关。
// 注意:本次不治理此项,新代码仍应避免低优先级覆盖高优先级的写法。
'no-descending-specificity': null,

// TDesign 设计 token 采用 camelCase 命名(如 --td-font-size-title-extraLarge、--td-comp-paddingLR-xs),
// 属于设计规范约定,不对 custom property 名称做 kebab-case 强制
'custom-property-pattern': null,
// 字体名保持原始大小写(PingFang SC、Microsoft YaHei 等),不做小写化
'value-keyword-case': null,
// 关键帧名称沿用设计 token 命名风格
'keyframes-name-pattern': null,
// Vue 单文件组件使用 :deep() 等作用域样式伪类
'selector-pseudo-class-no-unknown': [
true,
{
ignorePseudoClasses: ['deep', 'global', 'slotted'],
},
],
// 设计系统需要保留 -webkit- / -moz- 等厂商前缀以兼容旧版 Safari / 小程序等运行时,
// 不交由 stylelint 移除(自动前缀由构建侧 postcss/autoprefixer 负责)
'property-no-vendor-prefix': null,
'value-no-vendor-prefix': null,
'selector-no-vendor-prefix': null,
'at-rule-no-vendor-prefix': null,
// 保留历史写法(如 rgba() 兼容函数、小数点精度),避免对已上线样式造成回归
'color-function-alias-notation': null,
'number-max-precision': null,
// 设计系统会声明特定字体(如 PingFang SC、TCloud Number),不强制追加通用字体族
'font-family-no-missing-generic-family-keyword': null,
},
};
48 changes: 23 additions & 25 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
{
"typescript.preferences.importModuleSpecifier": "relative",
"js/ts.preferences.importModuleSpecifier": "relative",

"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "vue"],
"[html]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
"stylelint.validate": ["css", "less", "vue"],

"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.fixAll.stylelint": "explicit"
},
"[typescriptreact]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[vue]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"cSpell.words": ["miniprogram", "tdesign", "uniapp"],

"[html]": { "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[javascript]": { "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[typescript]": { "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[vue]": { "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[json]": { "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[jsonc]": { "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[markdown]": { "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[css]": { "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[less]": { "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[yaml]": { "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode" },

"prettier.requireConfig": true,
"files.eol": "\n",

"cSpell.words": ["miniprogram", "tdesign", "uniapp", "stylelint", "postcss", "wxss", "husky", "pnpm"],
"cSpell.ignorePaths": ["pnpm-lock.yaml", "node_modules", ".git", ".vscode"]
}
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ The following are the repositories for TDesign:

### Repositories for Mobile Components

| Repository | Description | Status |
| ----------------------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [tdesign-miniprogram](https://github.com/Tencent/tdesign-miniprogram) | Wechat MiniProgram UI components lib for TDesign | [![LTS](https://img.shields.io/badge/dynamic/json?style=flat-square&label=LTS&query=version&url=https://registry.npmjs.org/tdesign-miniprogram/latest&color=blue)](https://npmjs.com/package/tdesign-miniprogram) |
| [tdesign-mobile-vue](https://github.com/Tencent/tdesign-mobile-vue) | Vue3.x Mobile UI components lib for TDesign | [![LTS](https://img.shields.io/badge/dynamic/json?style=flat-square&label=LTS&query=version&url=https://registry.npmjs.org/tdesign-mobile-vue/latest&color=blue)](https://npmjs.com/package/tdesign-mobile-vue) |
| Repository | Description | Status |
| ----------------------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [tdesign-miniprogram](https://github.com/Tencent/tdesign-miniprogram) | Wechat MiniProgram UI components lib for TDesign | [![LTS](https://img.shields.io/badge/dynamic/json?style=flat-square&label=LTS&query=version&url=https://registry.npmjs.org/tdesign-miniprogram/latest&color=blue)](https://npmjs.com/package/tdesign-miniprogram) |
| [tdesign-mobile-vue](https://github.com/Tencent/tdesign-mobile-vue) | Vue3.x Mobile UI components lib for TDesign | [![LTS](https://img.shields.io/badge/dynamic/json?style=flat-square&label=LTS&query=version&url=https://registry.npmjs.org/tdesign-mobile-vue/latest&color=blue)](https://npmjs.com/package/tdesign-mobile-vue) |
| [tdesign-mobile-react](https://github.com/Tencent/tdesign-mobile-react) | React Mobile UI components lib for TDesign | [![LTS](https://img.shields.io/badge/dynamic/json?style=flat-square&label=LTS&query=version&url=https://registry.npmjs.org/tdesign-mobile-react/latest&color=blue)](https://npmjs.com/package/tdesign-mobile-react) |
| [tdesign-flutter](https://github.com/Tencent/tdesign-flutter) | Flutter UI components lib for TDesign | [![LTS](https://img.shields.io/badge/dynamic/json?style=flat-square&label=LTS&query=latest.version&url=https://pub.dev/api/packages/tdesign_flutter&color=blue)](https://pub.dev/packages/tdesign_flutter) |
| [tdesign-uniapp](https://github.com/Tencent/tdesign-miniprogram) | Uniapp UI components lib for TDesign | [![LTS](https://img.shields.io/badge/dynamic/json?style=flat-square&label=LTS&query=version&url=https://registry.npmjs.org/@tdesign/uniapp/latest&color=blue)](https://npmjs.com/package/@tdesign/uniapp) |
Expand Down Expand Up @@ -139,7 +139,6 @@ For more information, refer to the guide section of each component, such as [But

https://tdesign.tencent.com/contributor.html


## Contributing Guide

Any contributions to TDesign are welcome. Please read [《contributing for TDesign》](https://tdesign.tencent.com/about/contributing) for more information.
Expand Down
8 changes: 4 additions & 4 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ TDesign 是一个 `multi-repo`, TDesign 有如下代码仓库:

### 移动端组件库

| 仓库 | 描述 | 状态 |
| ----------------------------------------------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [tdesign-miniprogram](https://github.com/Tencent/tdesign-miniprogram) | TDesign 微信小程序组件库 | [![LTS](https://img.shields.io/badge/dynamic/json?style=flat-square&label=LTS&query=version&url=https://registry.npmjs.org/tdesign-miniprogram/latest&color=blue)](https://npmjs.com/package/tdesign-miniprogram) |
| [tdesign-mobile-vue](https://github.com/Tencent/tdesign-mobile-vue) | TDesign Vue3.x 移动端组件库 | [![LTS](https://img.shields.io/badge/dynamic/json?style=flat-square&label=LTS&query=version&url=https://registry.npmjs.org/tdesign-mobile-vue/latest&color=blue)](https://npmjs.com/package/tdesign-mobile-vue) |
| 仓库 | 描述 | 状态 |
| ----------------------------------------------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [tdesign-miniprogram](https://github.com/Tencent/tdesign-miniprogram) | TDesign 微信小程序组件库 | [![LTS](https://img.shields.io/badge/dynamic/json?style=flat-square&label=LTS&query=version&url=https://registry.npmjs.org/tdesign-miniprogram/latest&color=blue)](https://npmjs.com/package/tdesign-miniprogram) |
| [tdesign-mobile-vue](https://github.com/Tencent/tdesign-mobile-vue) | TDesign Vue3.x 移动端组件库 | [![LTS](https://img.shields.io/badge/dynamic/json?style=flat-square&label=LTS&query=version&url=https://registry.npmjs.org/tdesign-mobile-vue/latest&color=blue)](https://npmjs.com/package/tdesign-mobile-vue) |
| [tdesign-mobile-react](https://github.com/Tencent/tdesign-mobile-react) | TDesign React 移动端组件库 | [![LTS](https://img.shields.io/badge/dynamic/json?style=flat-square&label=LTS&query=version&url=https://registry.npmjs.org/tdesign-mobile-react/latest&color=blue)](https://npmjs.com/package/tdesign-mobile-react) |
| [tdesign-flutter](https://github.com/Tencent/tdesign-flutter) | TDesign Flutter 组件库 | [![LTS](https://img.shields.io/badge/dynamic/json?style=flat-square&label=LTS&query=latest.version&url=https://pub.dev/api/packages/tdesign_flutter&color=blue)](https://pub.dev/packages/tdesign_flutter) |
| [tdesign-uniapp](https://github.com/Tencent/tdesign-miniprogram) | TDesign Uniapp 组件库 | [![LTS](https://img.shields.io/badge/dynamic/json?style=flat-square&label=LTS&query=version&url=https://registry.npmjs.org/@tdesign/uniapp/latest&color=blue)](https://npmjs.com/package/@tdesign/uniapp) |
Expand Down
2 changes: 1 addition & 1 deletion docs/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version].

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
[version]: http://contributor-covenant.org/version/1/4/
Loading
Loading