create-bubbles 0.0.8 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template-react-rsbuild/biome.json +102 -101
- package/template-react-rsbuild/commitlint.config.js +1 -1
- package/template-react-rsbuild/lefthook.yml +1 -1
- package/template-react-rsbuild/package.json +16 -16
- package/template-react-rsbuild/rsbuild.config.ts +11 -5
- package/template-react-rsbuild/src/App.tsx +9 -9
- package/template-react-rsbuild/src/components/Loading/PageLoading.tsx +11 -11
- package/template-react-rsbuild/src/env.d.ts +1 -1
- package/template-react-rsbuild/src/index.tsx +20 -20
- package/template-react-rsbuild/src/pages/home/index.tsx +26 -26
- package/template-react-rsbuild/src/router/index.tsx +27 -27
- package/template-react-rsbuild/src/store/index.ts +0 -0
- package/template-react-rsbuild/src/store/modules/user.ts +11 -0
- package/template-react-rsbuild/src/types/auto-import.d.ts +47 -47
- package/template-react-rsbuild/src/utils/request/axios.ts +82 -93
- package/template-react-rsbuild/src/utils/request/index.ts +43 -26
- package/template-react-rsbuild/tsconfig.json +29 -29
- package/template-react-rsbuild/uno.config.ts +8 -8
- package/template-vue-rsbuild/.prettierrc +1 -0
- package/template-vue-rsbuild/.vscode/settings.json +7 -0
- package/template-vue-rsbuild/biome.json +102 -112
- package/template-vue-rsbuild/lefthook.yml +11 -0
- package/template-vue-rsbuild/package.json +32 -30
- package/template-vue-rsbuild/pnpm-lock.yaml +3324 -0
- package/template-vue-rsbuild/rsbuild.config.ts +35 -28
- package/template-vue-rsbuild/src/App.vue +1 -27
- package/template-vue-rsbuild/src/index.ts +15 -7
- package/template-vue-rsbuild/src/router/guard/index.tsx +6 -0
- package/template-vue-rsbuild/src/router/guard/permissionGuard.ts +8 -0
- package/template-vue-rsbuild/src/router/index.tsx +14 -0
- package/template-vue-rsbuild/src/router/modules/index.tsx +10 -0
- package/template-vue-rsbuild/src/store/index.ts +7 -0
- package/template-vue-rsbuild/src/store/modules/user.ts +17 -0
- package/template-vue-rsbuild/src/types/auto-import.d.ts +91 -91
- package/template-vue-rsbuild/src/types/env.d.ts +17 -0
- package/template-vue-rsbuild/src/utils/request/axios.ts +83 -0
- package/template-vue-rsbuild/src/utils/request/index.ts +77 -0
- package/template-vue-rsbuild/src/views/home/index.vue +11 -0
- package/template-vue-rsbuild-eslint/.env +3 -0
- package/template-vue-rsbuild-eslint/.env.development +0 -0
- package/template-vue-rsbuild-eslint/.env.production +0 -0
- package/template-vue-rsbuild-eslint/.prettierignore +4 -0
- package/template-vue-rsbuild-eslint/.prettierrc +17 -0
- package/{template-vue-rsbuild → template-vue-rsbuild-eslint}/.vscode/extensions.json +3 -3
- package/template-vue-rsbuild-eslint/README.md +29 -0
- package/template-vue-rsbuild-eslint/biome.json +110 -0
- package/template-vue-rsbuild-eslint/index.html +7 -0
- package/template-vue-rsbuild-eslint/package.json +31 -0
- package/{template-react-rsbuild → template-vue-rsbuild-eslint}/postcss.config.mjs +2 -2
- package/template-vue-rsbuild-eslint/public/.gitkeep +0 -0
- package/template-vue-rsbuild-eslint/rsbuild.config.ts +28 -0
- package/template-vue-rsbuild-eslint/src/App.vue +29 -0
- package/template-vue-rsbuild-eslint/src/env.d.ts +17 -0
- package/template-vue-rsbuild-eslint/src/index.ts +15 -0
- package/template-vue-rsbuild-eslint/src/router/guard/index.tsx +6 -0
- package/template-vue-rsbuild-eslint/src/router/guard/permissionGuard.ts +8 -0
- package/template-vue-rsbuild-eslint/src/router/index.tsx +14 -0
- package/template-vue-rsbuild-eslint/src/router/modules/index.tsx +10 -0
- package/template-vue-rsbuild-eslint/src/store/index.ts +7 -0
- package/template-vue-rsbuild-eslint/src/store/modules/user.ts +16 -0
- package/template-vue-rsbuild-eslint/src/styles/index.css +16 -0
- package/template-vue-rsbuild-eslint/src/types/auto-import.d.ts +91 -0
- package/template-vue-rsbuild-eslint/src/utils/request/axios.ts +83 -0
- package/template-vue-rsbuild-eslint/src/utils/request/index.ts +77 -0
- package/template-vue-rsbuild-eslint/src/views/home/index.vue +13 -0
- package/template-vue-rsbuild-eslint/tsconfig.json +29 -0
- package/template-vue-rsbuild-eslint/uno.config.ts +9 -0
- package/template-react-rsbuild/pnpm-lock.yaml +0 -3615
- package/template-vue-rsbuild/postcss.config.mjs +0 -5
- package/template-vue-rsbuild/src/env.d.ts +0 -9
- /package/{template-vue-rsbuild → template-vue-rsbuild-eslint}/src/index.css +0 -0
|
@@ -1,93 +1,82 @@
|
|
|
1
|
-
import { message } from '
|
|
2
|
-
import axios, { type AxiosResponse } from 'axios'
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
message.error(data
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
if (status === CodeEnum.UNAUTHORIZED) {
|
|
84
|
-
unAuthFunc();
|
|
85
|
-
} else {
|
|
86
|
-
message.error(data?.message || '系统异常');
|
|
87
|
-
return Promise.reject(error);
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
);
|
|
91
|
-
|
|
92
|
-
return instance;
|
|
93
|
-
};
|
|
1
|
+
import { message } from 'antd'
|
|
2
|
+
import axios, { type AxiosResponse } from 'axios'
|
|
3
|
+
|
|
4
|
+
import { router } from '@/router'
|
|
5
|
+
import { useUserStore } from '@/store/modules/user'
|
|
6
|
+
|
|
7
|
+
export interface CustomConfig {
|
|
8
|
+
/** 直接返回响应体 */
|
|
9
|
+
isTransformResponse?: boolean
|
|
10
|
+
// 成功需要提示
|
|
11
|
+
isShowSuccessMsg?: boolean
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export enum CodeEnum {
|
|
15
|
+
SUCCESS = 200,
|
|
16
|
+
UNAUTHORIZED = 401,
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const unAuthFunc = () => {
|
|
20
|
+
message.error('暂未登录或登录已过期,请重新登录')
|
|
21
|
+
router.navigate('/login')
|
|
22
|
+
}
|
|
23
|
+
export default (customConfig?: CustomConfig) => {
|
|
24
|
+
const token = useUserStore((state) => state.token)
|
|
25
|
+
|
|
26
|
+
const instance = axios.create({
|
|
27
|
+
baseURL: import.meta.env.PUBLIC_API_AFFIX,
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
instance.interceptors.request.use(
|
|
31
|
+
(config) => {
|
|
32
|
+
config.headers.set('X-Access-Token', token)
|
|
33
|
+
config.headers.set('Allow-Control-Allow-Origin', '*')
|
|
34
|
+
return config
|
|
35
|
+
},
|
|
36
|
+
(error) => {
|
|
37
|
+
message.error('请求错误')
|
|
38
|
+
return Promise.reject(error)
|
|
39
|
+
},
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
interface ResponseData<T = any> {
|
|
43
|
+
code: number
|
|
44
|
+
message: string
|
|
45
|
+
requestId: string
|
|
46
|
+
responseTime: number
|
|
47
|
+
result: T
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
instance.interceptors.response.use(
|
|
51
|
+
(response: AxiosResponse<ResponseData>) => {
|
|
52
|
+
const { status, data } = response
|
|
53
|
+
if (status === 200) {
|
|
54
|
+
if (customConfig?.isTransformResponse === false) return data
|
|
55
|
+
const { code, message: msg } = data
|
|
56
|
+
if (code === CodeEnum.SUCCESS) {
|
|
57
|
+
if (customConfig?.isShowSuccessMsg) {
|
|
58
|
+
message.success(msg)
|
|
59
|
+
}
|
|
60
|
+
return data.result
|
|
61
|
+
}
|
|
62
|
+
message.error(msg)
|
|
63
|
+
return Promise.reject(data)
|
|
64
|
+
}
|
|
65
|
+
if (status === CodeEnum.UNAUTHORIZED) {
|
|
66
|
+
unAuthFunc()
|
|
67
|
+
} else return Promise.reject(data.message)
|
|
68
|
+
},
|
|
69
|
+
(error) => {
|
|
70
|
+
const response = error.response
|
|
71
|
+
const { status, data } = response
|
|
72
|
+
if (status === CodeEnum.UNAUTHORIZED) {
|
|
73
|
+
unAuthFunc()
|
|
74
|
+
} else {
|
|
75
|
+
message.error(data?.message || '系统异常')
|
|
76
|
+
return Promise.reject(error)
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
return instance
|
|
82
|
+
}
|
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
import type { AxiosRequestConfig } from 'axios'
|
|
1
|
+
import type { AxiosRequestConfig } from 'axios'
|
|
2
2
|
|
|
3
|
-
import request, { type CustomConfig } from './axios'
|
|
3
|
+
import request, { type CustomConfig } from './axios'
|
|
4
4
|
|
|
5
5
|
interface createAxiosType {
|
|
6
|
-
get: (
|
|
6
|
+
get: <T = any>(
|
|
7
7
|
config: {
|
|
8
|
-
url: string
|
|
9
|
-
params?: AxiosRequestConfig['params']
|
|
10
|
-
config?: AxiosRequestConfig<any
|
|
8
|
+
url: string
|
|
9
|
+
params?: AxiosRequestConfig['params']
|
|
10
|
+
config?: AxiosRequestConfig<any>
|
|
11
11
|
},
|
|
12
12
|
option?: CustomConfig,
|
|
13
|
-
) => Promise<
|
|
14
|
-
post: (
|
|
13
|
+
) => Promise<T>
|
|
14
|
+
post: <T = any>(
|
|
15
15
|
config: {
|
|
16
|
-
url: string
|
|
17
|
-
data?: AxiosRequestConfig['data']
|
|
18
|
-
|
|
16
|
+
url: string
|
|
17
|
+
data?: AxiosRequestConfig['data']
|
|
18
|
+
params?: AxiosRequestConfig['params']
|
|
19
|
+
config?: AxiosRequestConfig<any>
|
|
19
20
|
},
|
|
20
21
|
option?: CustomConfig,
|
|
21
|
-
) => Promise<
|
|
22
|
-
put: (
|
|
22
|
+
) => Promise<T>
|
|
23
|
+
put: <T = any>(
|
|
23
24
|
config: {
|
|
24
|
-
url: string
|
|
25
|
-
data?: AxiosRequestConfig['data']
|
|
26
|
-
config?: AxiosRequestConfig<any
|
|
25
|
+
url: string
|
|
26
|
+
data?: AxiosRequestConfig['data']
|
|
27
|
+
config?: AxiosRequestConfig<any>
|
|
27
28
|
},
|
|
28
29
|
option?: CustomConfig,
|
|
29
|
-
) => Promise<
|
|
30
|
-
delete: (
|
|
30
|
+
) => Promise<T>
|
|
31
|
+
delete: <T = any>(
|
|
31
32
|
config: {
|
|
32
|
-
url: string
|
|
33
|
-
data?: AxiosRequestConfig['data']
|
|
34
|
-
config?: AxiosRequestConfig<any
|
|
33
|
+
url: string
|
|
34
|
+
data?: AxiosRequestConfig['data']
|
|
35
|
+
config?: AxiosRequestConfig<any>
|
|
35
36
|
},
|
|
36
37
|
option?: CustomConfig,
|
|
37
|
-
) => Promise<
|
|
38
|
+
) => Promise<T>
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
const createAxios: createAxiosType = {
|
|
@@ -44,9 +45,25 @@ const createAxios: createAxiosType = {
|
|
|
44
45
|
...config?.config,
|
|
45
46
|
}),
|
|
46
47
|
post: (
|
|
47
|
-
config: {
|
|
48
|
+
config: {
|
|
49
|
+
url: string
|
|
50
|
+
params?: Record<string, string>
|
|
51
|
+
data?: any
|
|
52
|
+
config?: AxiosRequestConfig<any>
|
|
53
|
+
},
|
|
48
54
|
option?: CustomConfig,
|
|
49
|
-
) =>
|
|
55
|
+
) => {
|
|
56
|
+
let url = config.url
|
|
57
|
+
if (config.params instanceof Object) {
|
|
58
|
+
url += '?'
|
|
59
|
+
const entries = Object.entries(config.params)
|
|
60
|
+
for (let i = 0; i < entries.length; i++) {
|
|
61
|
+
const [key, value] = entries[i]
|
|
62
|
+
url += `${key}=${value}${i < entries.length - 1 ? '&' : ''}`
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return request(option).post(url, config?.data, config?.config)
|
|
66
|
+
},
|
|
50
67
|
put: (
|
|
51
68
|
config: { url: string; data?: any; config?: AxiosRequestConfig<any> },
|
|
52
69
|
option?: CustomConfig,
|
|
@@ -55,6 +72,6 @@ const createAxios: createAxiosType = {
|
|
|
55
72
|
config: { url: string; config?: AxiosRequestConfig<any> },
|
|
56
73
|
customConfig?: CustomConfig,
|
|
57
74
|
) => request(customConfig).delete(config.url, config?.config),
|
|
58
|
-
}
|
|
75
|
+
}
|
|
59
76
|
|
|
60
|
-
export default createAxios
|
|
77
|
+
export default createAxios
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"lib": ["DOM", "ES2020"],
|
|
4
|
-
"jsx": "react-jsx",
|
|
5
|
-
"target": "ES2020",
|
|
6
|
-
"noEmit": true,
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
"useDefineForClassFields": true,
|
|
9
|
-
|
|
10
|
-
/* modules */
|
|
11
|
-
"module": "ESNext",
|
|
12
|
-
"isolatedModules": true,
|
|
13
|
-
"resolveJsonModule": true,
|
|
14
|
-
"moduleResolution": "Bundler",
|
|
15
|
-
"allowImportingTsExtensions": true,
|
|
16
|
-
|
|
17
|
-
/* type checking */
|
|
18
|
-
"strict": true,
|
|
19
|
-
"noUnusedLocals": true,
|
|
20
|
-
"noUnusedParameters": true,
|
|
21
|
-
|
|
22
|
-
"baseUrl": "./",
|
|
23
|
-
"paths": {
|
|
24
|
-
"@/*": ["src/*"]
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
"include": ["src"],
|
|
28
|
-
"exclude": ["node_modules", "dist"]
|
|
29
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"lib": ["DOM", "ES2020"],
|
|
4
|
+
"jsx": "react-jsx",
|
|
5
|
+
"target": "ES2020",
|
|
6
|
+
"noEmit": true,
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"useDefineForClassFields": true,
|
|
9
|
+
|
|
10
|
+
/* modules */
|
|
11
|
+
"module": "ESNext",
|
|
12
|
+
"isolatedModules": true,
|
|
13
|
+
"resolveJsonModule": true,
|
|
14
|
+
"moduleResolution": "Bundler",
|
|
15
|
+
"allowImportingTsExtensions": true,
|
|
16
|
+
|
|
17
|
+
/* type checking */
|
|
18
|
+
"strict": true,
|
|
19
|
+
"noUnusedLocals": true,
|
|
20
|
+
"noUnusedParameters": true,
|
|
21
|
+
|
|
22
|
+
"baseUrl": "./",
|
|
23
|
+
"paths": {
|
|
24
|
+
"@/*": ["src/*"]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"include": ["src"],
|
|
28
|
+
"exclude": ["node_modules", "dist"]
|
|
29
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineConfig, presetUno } from 'unocss';
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
content: {
|
|
5
|
-
filesystem: ['**/*.{html,js,ts,jsx,tsx,vue,svelte,astro}'],
|
|
6
|
-
},
|
|
7
|
-
presets: [presetUno()],
|
|
8
|
-
});
|
|
1
|
+
import { defineConfig, presetUno } from 'unocss';
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
content: {
|
|
5
|
+
filesystem: ['**/*.{html,js,ts,jsx,tsx,vue,svelte,astro}'],
|
|
6
|
+
},
|
|
7
|
+
presets: [presetUno()],
|
|
8
|
+
});
|
|
@@ -1,112 +1,102 @@
|
|
|
1
|
-
{
|
|
2
|
-
"files": {
|
|
3
|
-
"ignoreUnknown": true,
|
|
4
|
-
"ignore": [
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
"
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"a11y": {
|
|
104
|
-
"useValidAnchor": "off",
|
|
105
|
-
"useAnchorContent": "off",
|
|
106
|
-
"useKeyWithClickEvents": "off"
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
]
|
|
112
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"files": {
|
|
3
|
+
"ignoreUnknown": true,
|
|
4
|
+
"ignore": ["dist/*", "node_modules", "package.json"]
|
|
5
|
+
},
|
|
6
|
+
"formatter": {
|
|
7
|
+
"enabled": true,
|
|
8
|
+
"indentStyle": "space",
|
|
9
|
+
"lineWidth": 100,
|
|
10
|
+
"indentWidth": 2
|
|
11
|
+
},
|
|
12
|
+
"javascript": {
|
|
13
|
+
"formatter": {
|
|
14
|
+
"quoteStyle": "single",
|
|
15
|
+
"semicolons": "asNeeded"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"organizeImports": {
|
|
19
|
+
"enabled": false
|
|
20
|
+
},
|
|
21
|
+
"linter": {
|
|
22
|
+
"rules": {
|
|
23
|
+
"style": {
|
|
24
|
+
"useImportType": "off",
|
|
25
|
+
"useNumberNamespace": "off",
|
|
26
|
+
"useNodejsImportProtocol": "off",
|
|
27
|
+
"noNonNullAssertion": "off",
|
|
28
|
+
"noUnusedTemplateLiteral": "off"
|
|
29
|
+
},
|
|
30
|
+
"complexity": {
|
|
31
|
+
"noUselessTypeConstraint": "off",
|
|
32
|
+
"noForEach": "off"
|
|
33
|
+
},
|
|
34
|
+
"correctness": {
|
|
35
|
+
"useExhaustiveDependencies": "off"
|
|
36
|
+
},
|
|
37
|
+
"suspicious": {
|
|
38
|
+
"noGlobalIsNan": "off",
|
|
39
|
+
"noGlobalIsFinite": "off",
|
|
40
|
+
"noExplicitAny": "off",
|
|
41
|
+
"noArrayIndexKey": "off",
|
|
42
|
+
"noConfusingVoidType": "off",
|
|
43
|
+
"noThenProperty": "off"
|
|
44
|
+
},
|
|
45
|
+
"performance": {
|
|
46
|
+
"noDelete": "off",
|
|
47
|
+
"noAccumulatingSpread": "off"
|
|
48
|
+
},
|
|
49
|
+
"a11y": {
|
|
50
|
+
"noAriaHiddenOnFocusable": "off",
|
|
51
|
+
"noLabelWithoutControl": "off",
|
|
52
|
+
"useFocusableInteractive": "off",
|
|
53
|
+
"useKeyWithClickEvents": "off",
|
|
54
|
+
"useSemanticElements": "off"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"css": {
|
|
59
|
+
"formatter": {
|
|
60
|
+
"quoteStyle": "single"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"overrides": [
|
|
64
|
+
{
|
|
65
|
+
"include": ["**/*.test.ts", "**/*.test.tsx", "tests/**/*", "scripts/**/*", ".dumi/**/*"],
|
|
66
|
+
"linter": {
|
|
67
|
+
"rules": {
|
|
68
|
+
"style": {
|
|
69
|
+
"noParameterAssign": "off"
|
|
70
|
+
},
|
|
71
|
+
"suspicious": {
|
|
72
|
+
"noThenProperty": "off",
|
|
73
|
+
"noImplicitAnyLet": "off"
|
|
74
|
+
},
|
|
75
|
+
"complexity": {
|
|
76
|
+
"noUselessFragments": "off"
|
|
77
|
+
},
|
|
78
|
+
"a11y": {
|
|
79
|
+
"useValidAnchor": "off",
|
|
80
|
+
"useAnchorContent": "off",
|
|
81
|
+
"useKeyWithClickEvents": "off"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"include": ["components/*/demo/*"],
|
|
88
|
+
"linter": {
|
|
89
|
+
"rules": {
|
|
90
|
+
"correctness": {
|
|
91
|
+
"noVoidTypeReturn": "off"
|
|
92
|
+
},
|
|
93
|
+
"a11y": {
|
|
94
|
+
"useValidAnchor": "off",
|
|
95
|
+
"useAnchorContent": "off",
|
|
96
|
+
"useKeyWithClickEvents": "off"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
pre-commit:
|
|
2
|
+
commands:
|
|
3
|
+
check:
|
|
4
|
+
glob: '*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc,vue}'
|
|
5
|
+
run: npx @biomejs/biome check --write --no-errors-on-unmatched --files-ignore-unknown=true --colors=off {staged_files}
|
|
6
|
+
stage_fixed: true
|
|
7
|
+
|
|
8
|
+
commit-msg:
|
|
9
|
+
commands:
|
|
10
|
+
'lint commit message':
|
|
11
|
+
run: npx commitlint --edit {1}
|