Skip to content

Commit b7c2903

Browse files
committed
统一编码风格
1 parent f61a1ff commit b7c2903

35 files changed

Lines changed: 2132 additions & 2194 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ npm-debug.log*
88
pnpm-debug.log*
99
.vscode/*
1010
!.vscode/extensions.json
11+
!.vscode/settings.json
1112
.idea
1213
*.suo
1314
*.ntvs*

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["biomejs.biome"]
3+
}

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"editor.defaultFormatter": "biomejs.biome",
3+
"editor.formatOnSave": true
4+
}

biome.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.4.15/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"ignoreUnknown": false
10+
},
11+
"formatter": {
12+
"enabled": true,
13+
"indentStyle": "space",
14+
"indentWidth": 4,
15+
"lineWidth": 120
16+
},
17+
"javascript": {
18+
"formatter": {
19+
"quoteStyle": "single"
20+
}
21+
},
22+
"linter": {
23+
"enabled": true,
24+
"rules": {
25+
"recommended": true,
26+
"correctness": {
27+
"useHookAtTopLevel": "off",
28+
"useExhaustiveDependencies": "off"
29+
},
30+
"suspicious": {
31+
"noExplicitAny": "off"
32+
},
33+
"a11y": {
34+
"noStaticElementInteractions": "off",
35+
"useKeyWithClickEvents": "off"
36+
}
37+
}
38+
},
39+
"assist": {
40+
"enabled": true,
41+
"actions": {
42+
"source": {
43+
"organizeImports": "on"
44+
}
45+
}
46+
},
47+
"overrides": [
48+
{
49+
"includes": ["packages/docs/**"],
50+
"linter": {
51+
"enabled": false
52+
}
53+
}
54+
]
55+
}

package.json

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
{
2-
"name": "react-editable-tables",
3-
"private": true,
4-
"version": "0.0.0",
5-
"description": "React 可编辑表格方案集 — 原生轻量版 & Formily 高性能版",
6-
"type": "module",
7-
"scripts": {
8-
"dev:docs": "pnpm --filter @react-editable-tables/docs dev",
9-
"build:docs": "pnpm --filter @react-editable-tables/docs build",
10-
"test": "pnpm -r test",
11-
"lint": "pnpm -r lint",
12-
"check": "pnpm -r check",
13-
"type-check": "pnpm -r type-check"
14-
},
15-
"license": "MIT",
16-
"dependencies": {
17-
"react-is": "^19.2.6"
18-
}
2+
"name": "react-editable-tables",
3+
"private": true,
4+
"version": "0.0.0",
5+
"description": "React 可编辑表格方案集 — 原生轻量版 & Formily 高性能版",
6+
"type": "module",
7+
"scripts": {
8+
"dev:docs": "pnpm --filter @react-editable-tables/docs dev",
9+
"build:docs": "pnpm --filter @react-editable-tables/docs build",
10+
"test": "pnpm -r test",
11+
"format": "biome format --write .",
12+
"lint": "biome lint .",
13+
"check": "biome check --write .",
14+
"type-check": "pnpm -r type-check"
15+
},
16+
"license": "MIT",
17+
"devDependencies": {
18+
"@biomejs/biome": "^2.4.15"
19+
},
20+
"dependencies": {
21+
"react-is": "^19.2.6"
22+
}
1923
}

packages/docs/.vitepress/config.ts

Lines changed: 105 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,122 @@
1-
import { defineConfig } from 'vitepress'
2-
import react from '@vitejs/plugin-react'
1+
import react from '@vitejs/plugin-react';
2+
import { defineConfig } from 'vitepress';
33

44
export default defineConfig({
5-
title: 'React Editable Tables',
6-
description: 'React 可编辑表格方案集 — 原生轻量版 & Formily 高性能版',
7-
lang: 'zh-CN',
8-
lastUpdated: true,
9-
appearance: false,
5+
title: 'React Editable Tables',
6+
description: 'React 可编辑表格方案集 — 原生轻量版 & Formily 高性能版',
7+
lang: 'zh-CN',
8+
lastUpdated: true,
9+
appearance: false,
1010

11-
vite: {
12-
plugins: [react()],
13-
},
11+
vite: {
12+
plugins: [react()],
13+
},
1414

15-
head: [
16-
['link', { rel: 'icon', type: 'image/png', href: '/logo.png' }],
17-
['meta', { property: 'og:image', content: '/logo.png' }],
18-
['meta', { property: 'og:title', content: 'React Editable Tables' }],
19-
['meta', { property: 'og:description', content: 'React 可编辑表格方案集 — 原生轻量版 & Formily 高性能版' }],
20-
],
15+
head: [
16+
['link', { rel: 'icon', type: 'image/png', href: '/logo.png' }],
17+
['meta', { property: 'og:image', content: '/logo.png' }],
18+
['meta', { property: 'og:title', content: 'React Editable Tables' }],
19+
['meta', { property: 'og:description', content: 'React 可编辑表格方案集 — 原生轻量版 & Formily 高性能版' }],
20+
],
2121

22-
themeConfig: {
23-
logo: '/logo.png',
22+
themeConfig: {
23+
logo: '/logo.png',
2424

25-
nav: [
26-
{ text: '指南', link: '/guide/getting-started' },
27-
{ text: 'Native', link: '/native/basic' },
28-
{ text: 'Formily', link: '/formily/quick-start' },
29-
{
30-
text: '更新日志',
31-
link: 'https://github.com/chenJJ-88/react-editable-tables',
32-
},
33-
],
25+
nav: [
26+
{ text: '指南', link: '/guide/getting-started' },
27+
{ text: 'Native', link: '/native/basic' },
28+
{ text: 'Formily', link: '/formily/quick-start' },
29+
{
30+
text: '更新日志',
31+
link: 'https://github.com/chenJJ-88/react-editable-tables',
32+
},
33+
],
3434

35-
sidebar: {
36-
'/guide/': [
37-
{
38-
text: '开始',
39-
items: [
40-
{ text: '快速上手', link: '/guide/getting-started' },
41-
{ text: '方案选型', link: '/guide/comparison' },
42-
],
43-
},
44-
],
45-
'/native/': [
46-
{
47-
text: '使用指南',
48-
items: [
49-
{ text: '基础用法', link: '/native/basic' },
50-
{ text: '编辑模式', link: '/native/edit-mode' },
51-
{ text: '表单校验', link: '/native/validation' },
52-
{ text: '数据联动', link: '/native/linkage' },
53-
{ text: '自定义编辑器', link: '/native/custom-editor' },
54-
{ text: '行操作', link: '/native/row-ops' },
55-
{ text: '大数据量性能', link: '/native/performance' },
56-
],
57-
},
58-
{
59-
text: 'API',
60-
items: [{ text: 'API 参考', link: '/native/api' }],
35+
sidebar: {
36+
'/guide/': [
37+
{
38+
text: '开始',
39+
items: [
40+
{ text: '快速上手', link: '/guide/getting-started' },
41+
{ text: '方案选型', link: '/guide/comparison' },
42+
],
43+
},
44+
],
45+
'/native/': [
46+
{
47+
text: '使用指南',
48+
items: [
49+
{ text: '基础用法', link: '/native/basic' },
50+
{ text: '编辑模式', link: '/native/edit-mode' },
51+
{ text: '表单校验', link: '/native/validation' },
52+
{ text: '数据联动', link: '/native/linkage' },
53+
{ text: '自定义编辑器', link: '/native/custom-editor' },
54+
{ text: '行操作', link: '/native/row-ops' },
55+
{ text: '大数据量性能', link: '/native/performance' },
56+
],
57+
},
58+
{
59+
text: 'API',
60+
items: [{ text: 'API 参考', link: '/native/api' }],
61+
},
62+
],
63+
'/formily/': [
64+
{
65+
text: '使用指南',
66+
items: [
67+
{ text: '快速开始', link: '/formily/quick-start' },
68+
{ text: 'Effects 兼容', link: '/formily/effects' },
69+
{ text: '大数据量性能', link: '/formily/large-data' },
70+
],
71+
},
72+
{
73+
text: 'API',
74+
items: [{ text: 'API 参考', link: '/formily/api' }],
75+
},
76+
],
6177
},
62-
],
63-
'/formily/': [
64-
{
65-
text: '使用指南',
66-
items: [
67-
{ text: '快速开始', link: '/formily/quick-start' },
68-
{ text: 'Effects 兼容', link: '/formily/effects' },
69-
{ text: '大数据量性能', link: '/formily/large-data' },
70-
],
71-
},
72-
{
73-
text: 'API',
74-
items: [{ text: 'API 参考', link: '/formily/api' }],
75-
},
76-
],
77-
},
7878

79-
search: {
80-
provider: 'local',
81-
options: {
82-
locales: {
83-
root: {
84-
translations: {
85-
button: { buttonText: '搜索文档', buttonAriaLabel: '搜索文档' },
86-
modal: {
87-
noResultsText: '无法找到相关结果',
88-
resetButtonTitle: '清除查询条件',
89-
footer: { selectText: '选择', navigateText: '切换', closeText: '关闭' },
90-
},
79+
search: {
80+
provider: 'local',
81+
options: {
82+
locales: {
83+
root: {
84+
translations: {
85+
button: { buttonText: '搜索文档', buttonAriaLabel: '搜索文档' },
86+
modal: {
87+
noResultsText: '无法找到相关结果',
88+
resetButtonTitle: '清除查询条件',
89+
footer: { selectText: '选择', navigateText: '切换', closeText: '关闭' },
90+
},
91+
},
92+
},
93+
},
9194
},
92-
},
9395
},
94-
},
95-
},
9696

97-
editLink: {
98-
pattern: 'https://github.com/chenJJ-88/react-editable-tables/edit/main/packages/docs/:path',
99-
text: '在 GitHub 上编辑此页',
100-
},
97+
editLink: {
98+
pattern: 'https://github.com/chenJJ-88/react-editable-tables/edit/main/packages/docs/:path',
99+
text: '在 GitHub 上编辑此页',
100+
},
101101

102-
footer: {
103-
message: '基于 MIT 许可发布',
104-
},
102+
footer: {
103+
message: '基于 MIT 许可发布',
104+
},
105105

106-
docFooter: {
107-
prev: '上一页',
108-
next: '下一页',
109-
},
106+
docFooter: {
107+
prev: '上一页',
108+
next: '下一页',
109+
},
110110

111-
outline: {
112-
label: '页面导航',
113-
},
111+
outline: {
112+
label: '页面导航',
113+
},
114114

115-
lastUpdated: {
116-
text: '最后更新于',
117-
},
115+
lastUpdated: {
116+
text: '最后更新于',
117+
},
118118

119-
returnToTopLabel: '回到顶部',
120-
sidebarMenuLabel: '菜单',
121-
},
122-
})
119+
returnToTopLabel: '回到顶部',
120+
sidebarMenuLabel: '菜单',
121+
},
122+
});

0 commit comments

Comments
 (0)