@lark-apaas/coding-template-vite-react 0.1.12 → 0.1.14
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/.githooks/pre-commit +9 -0
- package/template/eslint.config.mjs +32 -5
- package/template/package-lock.json +1497 -71
- package/template/package.json +13 -5
- package/template/scripts/setup-git-hooks.mjs +20 -0
- package/template/tsconfig.app.json +1 -1
- package/template/dist/output/index.html +0 -69
- package/template/dist/output/routes.json +0 -5
- package/template/dist/output_capabilities/README.md +0 -5
- package/template/dist/output_resource/assets/index-BfPcZpFn.css +0 -2
- package/template/dist/output_resource/assets/index-kNdDV1l7.js +0 -9
- package/template/dist/output_resource/assets/index-kNdDV1l7.js.map +0 -1
- package/template/dist/output_resource/assets/polyfills.js +0 -1
- package/template/dist/output_resource/assets/radix-CJb0azbR.js +0 -45
- package/template/dist/output_resource/assets/radix-CJb0azbR.js.map +0 -1
- package/template/dist/output_resource/assets/rolldown-runtime-Cyuzqnbw.js +0 -1
- package/template/dist/output_resource/assets/toolkit-TzhP7hZD.js +0 -54
- package/template/dist/output_resource/assets/toolkit-TzhP7hZD.js.map +0 -1
- package/template/dist/output_static/README.md +0 -16
package/package.json
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# miaoda vite-react: pre-commit — 通用入口,具体门禁内容由 package.json 的 precommit 脚本决定
|
|
3
|
+
# 注册(core.hooksPath=.githooks)由 package.json 的 prepare 脚本在 npm install 时完成,
|
|
4
|
+
# fullstack upgrade 的 activateGitHooks 作为兜底(覆盖 install 早于 git init 的时序)。
|
|
5
|
+
[ "$SKIP_GIT_HOOKS" = "1" ] && exit 0
|
|
6
|
+
if ! npm run precommit; then
|
|
7
|
+
echo "✗ pre-commit: 校验未通过,已阻断提交(绕过:git commit --no-verify 或 SKIP_GIT_HOOKS=1)" >&2
|
|
8
|
+
exit 1
|
|
9
|
+
fi
|
|
@@ -1,7 +1,34 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import js from '@eslint/js'
|
|
2
|
+
import globals from 'globals'
|
|
3
|
+
import reactHooks from 'eslint-plugin-react-hooks'
|
|
4
|
+
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
5
|
+
import tseslint from 'typescript-eslint'
|
|
6
|
+
import { defineConfig, globalIgnores } from 'eslint/config'
|
|
3
7
|
|
|
4
|
-
export default [
|
|
8
|
+
export default defineConfig([
|
|
5
9
|
globalIgnores(['dist', '**/components/ui/**']),
|
|
6
|
-
|
|
7
|
-
]
|
|
10
|
+
{
|
|
11
|
+
files: ['**/*.{ts,tsx}'],
|
|
12
|
+
extends: [
|
|
13
|
+
js.configs.recommended,
|
|
14
|
+
tseslint.configs.recommended,
|
|
15
|
+
reactHooks.configs.flat.recommended,
|
|
16
|
+
reactRefresh.configs.vite,
|
|
17
|
+
],
|
|
18
|
+
languageOptions: {
|
|
19
|
+
ecmaVersion: 2020,
|
|
20
|
+
globals: globals.browser,
|
|
21
|
+
},
|
|
22
|
+
rules: {
|
|
23
|
+
// 关闭仅语法相关、不影响编译和运行时的规则
|
|
24
|
+
'react-refresh/only-export-components': 'off',
|
|
25
|
+
'@typescript-eslint/no-unused-vars': 'off',
|
|
26
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
27
|
+
'@typescript-eslint/no-empty-object-type': 'off',
|
|
28
|
+
'@typescript-eslint/no-require-imports': 'off',
|
|
29
|
+
'no-empty': 'off',
|
|
30
|
+
'prefer-const': 'off',
|
|
31
|
+
'no-unused-labels': 'off',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
])
|