2 次代码提交 155af32636 ... a3d08f8ee7

作者 SHA1 备注 提交日期
  Jane a3d08f8ee7 修正 2 月之前
  Jane 0ce4b7825b 修正 2 月之前
共有 4 个文件被更改,包括 43 次插入5 次删除
  1. 11 0
      .husky/pre-commit
  2. 25 0
      exit
  3. 4 1
      package.json
  4. 3 4
      src/App.vue

+ 11 - 0
.husky/pre-commit

@@ -0,0 +1,11 @@
+#!/bin/sh
+. "$(dirname "$0")/_/husky.sh"
+
+# 运行 ESLint 检查
+npm run lint
+
+# 运行 Stylelint 检查
+npm run stylelint
+
+# 运行 Prettier 格式化
+npm run format

+ 25 - 0
exit

@@ -0,0 +1,25 @@
+diff.astextplain.textconv=astextplain
+filter.lfs.clean=git-lfs clean -- %f
+filter.lfs.smudge=git-lfs smudge -- %f
+filter.lfs.process=git-lfs filter-process
+filter.lfs.required=true
+http.sslbackend=openssl
+http.sslcainfo=C:/Software/Git/mingw64/etc/ssl/certs/ca-bundle.crt
+core.autocrlf=true
+core.fscache=true
+core.symlinks=false
+pull.rebase=false
+credential.helper=manager
+credential.https://dev.azure.com.usehttppath=true
+init.defaultbranch=main
+core.editor="C:\Software\Microsoft VS Code\bin\code" --wait
+user.name=Jane
+user.email=kefubu@111.com
+core.repositoryformatversion=0
+core.filemode=false
+core.bare=false
+core.logallrefupdates=true
+core.symlinks=false
+core.ignorecase=true
+remote.vue_project_template.url=https://gitpack.cn/record/Vite_Project_template.git
+remote.vue_project_template.fetch=+refs/heads/*:refs/remotes/vue_project_template/*

+ 4 - 1
package.json

@@ -8,7 +8,10 @@
     "build": "vue-tsc -b && vite build",
     "preview": "vite preview",
     "lint:css": "stylelint '**/*.{css,scss,vue}'",
-    "lint:css:fix": "stylelint '**/*.{css,scss,vue}' --fix"
+    "lint:css:fix": "stylelint '**/*.{css,scss,vue}' --fix",
+    "lint": "eslint . && stylelint '**/*.css'",
+    "format": "prettier --write '**/*.{js,jsx,ts,tsx,css,scss,html}'",
+    "prepare": "husky"
   },
   "dependencies": {
     "vue": "^3.5.12"

+ 3 - 4
src/App.vue

@@ -1,10 +1,9 @@
 <script lang="ts" setup>
 const str = "hello";
 
-const a = () => {
-  console.log("哈哈哈哈哈");
-};
-a();
+for (let i = 0; i < 10; i++) {
+  console.log(i);
+}
 </script>
 
 <template>