Skip to content

Commit 4ce8037

Browse files
committed
Merge remote-tracking branch 'origin' into rylan/fix/table/min-width
2 parents 2709624 + a9c3fed commit 4ce8037

1,132 files changed

Lines changed: 21066 additions & 5952 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ _site
1313
temp*
1414
static/
1515
packages/common
16+
packages/ai-core
17+
site/engineering/static

.eslintrc.js

Lines changed: 93 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
module.exports = {
22
extends: [
33
'airbnb-base',
4-
'prettier', // eslint-config-prettier 处理冲突
54
'plugin:react/recommended',
6-
'plugin:import/typescript',
75
'plugin:@typescript-eslint/recommended',
6+
'plugin:prettier/recommended',
87
],
98
parser: '@typescript-eslint/parser',
10-
plugins: ['@typescript-eslint', 'react-hooks'],
9+
plugins: ['@typescript-eslint', 'react-hooks', 'simple-import-sort', 'prettier'],
1110
env: {
1211
browser: true,
1312
node: true,
@@ -27,32 +26,17 @@ module.exports = {
2726
},
2827
},
2928
rules: {
29+
'no-console': [
30+
'warn',
31+
{
32+
allow: ['info', 'warn', 'error'],
33+
},
34+
],
35+
36+
// code style config
37+
'no-param-reassign': 'off',
38+
'guard-for-in': 'off',
3039
'no-use-before-define': 'off',
31-
'@typescript-eslint/explicit-module-boundary-types': 'off',
32-
'@typescript-eslint/ban-types': 'off',
33-
'@typescript-eslint/explicit-function-return-type': 'off',
34-
'@typescript-eslint/indent': ['off', 2],
35-
'@typescript-eslint/ban-ts-comment': 'off',
36-
'@typescript-eslint/camelcase': 'off',
37-
'@typescript-eslint/no-empty-interface': 'error', // codecc
38-
'@typescript-eslint/no-explicit-any': 'off',
39-
'@typescript-eslint/no-use-before-define': ['error', { functions: false }],
40-
'@typescript-eslint/no-var-requires': 'off',
41-
'@typescript-eslint/no-unused-vars': 'error', // codecc
42-
'import/order': 'error',
43-
'import/extensions': 'off',
44-
'import/no-named-as-default': 'off',
45-
'import/prefer-default-export': 'off',
46-
'import/no-extraneous-dependencies': 'off',
47-
'import/no-cycle': 'off', // TODO: turn on this rule later
48-
'import/no-unresolved': 'off', // TODO: turn on this rule later
49-
'react/display-name': 'off',
50-
'react-hooks/exhaustive-deps': 'warn',
51-
'react-hooks/rules-of-hooks': 'error',
52-
'react/prop-types': 'off',
53-
'max-len': 'off',
54-
'no-shadow': 'off',
55-
'no-console': ['warn', { allow: ['warn', 'error'] }],
5640
'no-throw-literal': 'off',
5741
'no-unused-expressions': 'off',
5842
'no-bitwise': 'off',
@@ -68,7 +52,7 @@ module.exports = {
6852
'no-restricted-syntax': 'off',
6953
'no-restricted-globals': 'off',
7054
'no-unneeded-ternary': 'off',
71-
'eol-last': 'error', // codecc
55+
'eol-last': 'error',
7256
'func-names': 'off',
7357
'consistent-return': 'off',
7458
'default-case': 'off',
@@ -83,6 +67,86 @@ module.exports = {
8367
],
8468
},
8569
],
70+
'max-len': 'off',
71+
'no-shadow': 'off',
72+
'prettier/prettier': [
73+
'error',
74+
{
75+
printWidth: 120,
76+
tabWidth: 2,
77+
useTabs: false,
78+
semi: true,
79+
singleQuote: true,
80+
quoteProps: 'as-needed',
81+
jsxSingleQuote: false,
82+
trailingComma: 'all',
83+
bracketSpacing: true,
84+
jsxBracketSameLine: false,
85+
arrowParens: 'always',
86+
proseWrap: 'preserve',
87+
htmlWhitespaceSensitivity: 'css',
88+
endOfLine: 'lf',
89+
},
90+
],
91+
// import config
92+
'import/order': 'off',
93+
'import/extensions': 'off',
94+
'import/no-named-as-default': 'off',
95+
'import/prefer-default-export': 'off',
96+
'import/no-extraneous-dependencies': 'off',
97+
'import/no-cycle': 'off',
98+
'import/no-unresolved': 'off',
99+
'import/no-relative-packages': 'off',
100+
'simple-import-sort/imports': [
101+
'error',
102+
{
103+
groups: [
104+
// NodeJS 内置模块
105+
[
106+
'^(assert|buffer|child_process|cluster|console|constants|crypto|dgram|dns|domain|events|fs|http|https|module|net|os|path|punycode|querystring|readline|repl|stream|string_decoder|sys|timers|tls|tty|url|util|vm|zlib)(/.*|$)',
107+
],
108+
// 副作用导入(例如 "dotenv/config"
109+
['^\\u0000'],
110+
// 第三方包
111+
['^react', '^\\w', '^@\\w'],
112+
// 内部路径别名
113+
['^@/'],
114+
// 相对路径
115+
['^\\.'],
116+
// 类型
117+
['^react\\u0000$', '^@?\\w.*\\u0000$', '^@/.*\\u0000$', '^\\..*\\u0000$'],
118+
// css
119+
['\\.css$', '\\.less$'],
120+
],
121+
},
122+
],
123+
'simple-import-sort/exports': 'error',
124+
// typescript config
125+
'@typescript-eslint/explicit-module-boundary-types': 'off',
126+
'@typescript-eslint/ban-types': 'off',
127+
'@typescript-eslint/explicit-function-return-type': 'off',
128+
'@typescript-eslint/indent': ['off', 2],
129+
'@typescript-eslint/ban-ts-comment': 'off',
130+
'@typescript-eslint/camelcase': 'off',
131+
'@typescript-eslint/no-empty-interface': 'error',
132+
'@typescript-eslint/no-explicit-any': 'off',
133+
'@typescript-eslint/no-use-before-define': ['error', { functions: false }],
134+
'@typescript-eslint/no-var-requires': 'off',
135+
'@typescript-eslint/no-unused-vars': 'error',
136+
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
137+
'@typescript-eslint/consistent-type-imports': [
138+
'error',
139+
{
140+
prefer: 'type-imports',
141+
fixStyle: 'separate-type-imports',
142+
disallowTypeAnnotations: false,
143+
},
144+
],
145+
// react config
146+
'react/display-name': 'off',
147+
'react-hooks/exhaustive-deps': 'warn',
148+
'react-hooks/rules-of-hooks': 'error',
149+
'react/prop-types': 'off',
86150
},
87151
overrides: [
88152
{

.github/dependabot.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ updates:
1111
schedule:
1212
interval: 'monthly'
1313

14-
# Enable version updates for Docker
15-
- package-ecosystem: 'docker'
16-
# Look for a `Dockerfile` in the `root` directory
14+
# Enable version updates for github actions
15+
- package-ecosystem: 'github-actions'
1716
directory: '/'
18-
# Check for updates once a week
1917
schedule:
2018
interval: 'monthly'

.github/workflows/auto-changelog-callback.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Download pr id
16-
uses: dawidd6/action-download-artifact@v8
16+
uses: dawidd6/action-download-artifact@v21
1717
with:
1818
workflow: ${{ github.event.workflow_run.workflow_id }}
1919
run_id: ${{ github.event.workflow_run.id }}

.github/workflows/auto-publish.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
publish-official-website:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v4
11+
- uses: actions/checkout@v6
1212
with:
1313
ref: main
1414
fetch-depth: 0
@@ -29,21 +29,21 @@ jobs:
2929
if: startsWith(github.event.release.tag_name,'tdesign-react')
3030
runs-on: ubuntu-latest
3131
steps:
32-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@v6
3333
with:
3434
submodules: recursive
3535

36-
- uses: pnpm/action-setup@v4
36+
- uses: pnpm/action-setup@v6
3737

38-
- uses: actions/setup-node@v4
38+
- uses: actions/setup-node@v6
3939
with:
4040
node-version-file: .node-version
4141

4242
- run: pnpm install
4343

4444
- run: pnpm -C packages/tdesign-react/site run preview
4545

46-
- uses: actions/github-script@v7
46+
- uses: actions/github-script@v9
4747
id: domain
4848
with:
4949
script: |
@@ -62,21 +62,21 @@ jobs:
6262
if: startsWith(github.event.release.tag_name,'@tdesign-react/chat')
6363
runs-on: ubuntu-latest
6464
steps:
65-
- uses: actions/checkout@v4
65+
- uses: actions/checkout@v6
6666
with:
6767
submodules: recursive
6868

69-
- uses: pnpm/action-setup@v4
69+
- uses: pnpm/action-setup@v6
7070

71-
- uses: actions/setup-node@v4
71+
- uses: actions/setup-node@v6
7272
with:
7373
node-version-file: .node-version
7474

7575
- run: pnpm install
7676

7777
- run: pnpm -C packages/tdesign-react-aigc/site run preview
7878

79-
- uses: actions/github-script@v7
79+
- uses: actions/github-script@v9
8080
id: domain
8181
with:
8282
script: |

.github/workflows/auto-release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ jobs:
1313
if: github.event.pull_request.merged && startsWith(github.head_ref, 'release/')
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v6
1717
with:
1818
submodules: recursive
1919

20-
- uses: pnpm/action-setup@v4
20+
- uses: pnpm/action-setup@v6
2121

22-
- uses: actions/setup-node@v4
22+
- uses: actions/setup-node@v6
2323
with:
2424
node-version-file: .node-version
2525

2626
- run: pnpm install
2727

2828
- run: pnpm exec run-p build build:aigc
2929

30-
- uses: actions/setup-node@v4
30+
- uses: actions/setup-node@v6
3131
with:
3232
node-version: 24
3333

.github/workflows/issue-assignees.temp.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/issue-help-wanted.temp.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# 当打上 "help wanted" 标签时,自动留言引导社区贡献
2+
name: issue-help-wanted
3+
4+
on:
5+
issues:
6+
types: [labeled]
7+
8+
jobs:
9+
call-issue-help-wanted:
10+
uses: TDesignOteam/workflows/.github/workflows/reusable-issue-help-wanted.yml@main

.github/workflows/issue-label.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)