王家程 11 ヶ月 前
コミット
ab8e014606
11 ファイル変更499 行追加161 行削除
  1. 8 5
      .eslintrc.js
  2. 0 0
      .husky/_/.gitignore
  3. 36 0
      .husky/_/husky.sh
  4. 0 7
      .husky/commit-msg
  5. 3 9
      .husky/pre-commit
  6. 3 0
      .vscode/extensions.json
  7. 4 2
      main.ts
  8. 15 12
      package.json
  9. 2 6
      pages/index/index.vue
  10. 427 118
      pnpm-lock.yaml
  11. 1 2
      tsconfig.json

+ 8 - 5
.eslintrc.js

@@ -2,18 +2,20 @@
  * @Author: wjc
  * @Author: wjc
  * @Date: 2024-05-27 11:53:23
  * @Date: 2024-05-27 11:53:23
  * @LastEditors: wjc
  * @LastEditors: wjc
- * @LastEditTime: 2024-05-28 10:01:37
+ * @LastEditTime: 2024-05-28 15:14:01
  * @Description: 
  * @Description: 
  */
  */
 module.exports = {
 module.exports = {
-  root: true,
   env: {
   env: {
     browser: true,
     browser: true,
     node: true,
     node: true,
   },
   },
   extends: [
   extends: [
+    'eslint:recommended',
     'plugin:vue/vue3-recommended',
     'plugin:vue/vue3-recommended',
     'plugin:@typescript-eslint/recommended',
     'plugin:@typescript-eslint/recommended',
+    'plugin:import/recommended',
+    'standard',
     'prettier',
     'prettier',
     'plugin:prettier/recommended',
     'plugin:prettier/recommended',
   ],
   ],
@@ -29,7 +31,7 @@ module.exports = {
       jsx: true,
       jsx: true,
     },
     },
   },
   },
-  plugins: ['vue', '@typescript-eslint'],
+  plugins: ['vue', '@typescript-eslint', 'prettier', 'import'],
   rules: {
   rules: {
     'vue/no-mutating-props': [
     'vue/no-mutating-props': [
       'error',
       'error',
@@ -39,10 +41,11 @@ module.exports = {
     ],
     ],
     'vue/valid-template-root': [0],
     'vue/valid-template-root': [0],
     'vue/no-reserved-component-names': 'off',
     'vue/no-reserved-component-names': 'off',
-    'vue/multi-word-component-names': 'off',
+    'vue/multi-word-component-names': [1],
     '@typescript-eslint/no-explicit-any': 'off',
     '@typescript-eslint/no-explicit-any': 'off',
     '@typescript-eslint/ban-ts-comment': [0],
     '@typescript-eslint/ban-ts-comment': [0],
     '@typescript-eslint/no-unused-vars': [0],
     '@typescript-eslint/no-unused-vars': [0],
-    'space-before-function-paren': 1,
+    // 'space-before-function-paren': 1,
+    // 'no-unused-vars': 'off',
   },
   },
 }
 }

+ 0 - 0
.husky/_/.gitignore


+ 36 - 0
.husky/_/husky.sh

@@ -0,0 +1,36 @@
+#!/usr/bin/env sh
+if [ -z "$husky_skip_init" ]; then
+  debug () {
+    if [ "$HUSKY_DEBUG" = "1" ]; then
+      echo "husky (debug) - $1"
+    fi
+  }
+
+  readonly hook_name="$(basename -- "$0")"
+  debug "starting $hook_name..."
+
+  if [ "$HUSKY" = "0" ]; then
+    debug "HUSKY env variable is set to 0, skipping hook"
+    exit 0
+  fi
+
+  if [ -f ~/.huskyrc ]; then
+    debug "sourcing ~/.huskyrc"
+    . ~/.huskyrc
+  fi
+
+  readonly husky_skip_init=1
+  export husky_skip_init
+  sh -e "$0" "$@"
+  exitCode="$?"
+
+  if [ $exitCode != 0 ]; then
+    echo "husky - $hook_name hook exited with code $exitCode (error)"
+  fi
+
+  if [ $exitCode = 127 ]; then
+    echo "husky - command not found in PATH=$PATH"
+  fi
+
+  exit $exitCode
+fi

+ 0 - 7
.husky/commit-msg

@@ -1,10 +1,3 @@
-###
- # @Author: wjc
- # @Date: 2024-05-27 11:48:03
- # @LastEditors: wjc
- # @LastEditTime: 2024-05-27 11:49:24
- # @Description: 
-### 
 #!/usr/bin/env sh
 #!/usr/bin/env sh
 . "$(dirname -- "$0")/_/husky.sh"
 . "$(dirname -- "$0")/_/husky.sh"
 
 

+ 3 - 9
.husky/pre-commit

@@ -1,13 +1,7 @@
-###
- # @Author: wjc
- # @Date: 2024-05-27 11:39:20
- # @LastEditors: wjc
- # @LastEditTime: 2024-05-27 11:49:35
- # @Description: 
-### 
 #!/usr/bin/env sh
 #!/usr/bin/env sh
+
 . "$(dirname -- "$0")/_/husky.sh"
 . "$(dirname -- "$0")/_/husky.sh"
 
 
-echo '----代码检查开始----'
+echo '----commit 检查开始----'
 pnpm pre-commit
 pnpm pre-commit
-echo '----代码检查结束----'
+echo '----commit 检查结束----'

+ 3 - 0
.vscode/extensions.json

@@ -0,0 +1,3 @@
+{
+  "recommendations": []
+}

+ 4 - 2
main.ts

@@ -2,13 +2,15 @@
  * @Author: wjc
  * @Author: wjc
  * @Date: 2024-05-27 11:49:45
  * @Date: 2024-05-27 11:49:45
  * @LastEditors: wjc
  * @LastEditors: wjc
- * @LastEditTime: 2024-05-27 17:24:37
+ * @LastEditTime: 2024-05-28 11:27:30
  * @Description: 
  * @Description: 
  */
  */
 import { createSSRApp } from 'vue'
 import { createSSRApp } from 'vue'
 import uView from 'uview-ui'
 import uView from 'uview-ui'
 
 
-import App from './App'
+import App from './App.vue'
+
+var d = 1;
 
 
 export function createApp() {
 export function createApp() {
   const app = createSSRApp(App)
   const app = createSSRApp(App)

+ 15 - 12
package.json

@@ -5,11 +5,11 @@
   "main": "index.js",
   "main": "index.js",
   "scripts": {
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1",
     "test": "echo \"Error: no test specified\" && exit 1",
-    "lint": "eslint . --ext .vue,.js,.jsx,.ts,.tsx --fix --ignore-path .gitignore",
-    "format": "prettier --write src/",
-    "lint:style": "stylelint \"./src/*.{css,scss,vue,html}\" --fix",
+    "lint": "eslint --fix",
+    "format": "prettier --write",
+    "lint:style": "stylelint --fix",
     "pre-commit": "lint-staged",
     "pre-commit": "lint-staged",
-    "prepare": "husky"
+    "prepare": "husky install"
   },
   },
   "keywords": [],
   "keywords": [],
   "author": "",
   "author": "",
@@ -20,14 +20,14 @@
     "@typescript-eslint/eslint-plugin": "^7.10.0",
     "@typescript-eslint/eslint-plugin": "^7.10.0",
     "@typescript-eslint/parser": "^7.10.0",
     "@typescript-eslint/parser": "^7.10.0",
     "commitlint": "^19.3.0",
     "commitlint": "^19.3.0",
-    "eslint": "^9.3.0",
+    "eslint": "^8.57.0",
     "eslint-config-prettier": "^9.1.0",
     "eslint-config-prettier": "^9.1.0",
     "eslint-config-standard": "^17.1.0",
     "eslint-config-standard": "^17.1.0",
     "eslint-import-resolver-typescript": "^3.6.1",
     "eslint-import-resolver-typescript": "^3.6.1",
     "eslint-plugin-import": "^2.29.1",
     "eslint-plugin-import": "^2.29.1",
     "eslint-plugin-prettier": "^5.1.3",
     "eslint-plugin-prettier": "^5.1.3",
     "eslint-plugin-vue": "^9.26.0",
     "eslint-plugin-vue": "^9.26.0",
-    "husky": "^9.0.11",
+    "husky": "^8.0.3",
     "lint-staged": "^15.2.5",
     "lint-staged": "^15.2.5",
     "postcss": "^8.4.38",
     "postcss": "^8.4.38",
     "postcss-html": "^1.7.0",
     "postcss-html": "^1.7.0",
@@ -39,19 +39,22 @@
     "stylelint-config-standard-vue": "^1.0.0",
     "stylelint-config-standard-vue": "^1.0.0",
     "stylelint-order": "^6.0.4",
     "stylelint-order": "^6.0.4",
     "stylelint-scss": "^6.3.0",
     "stylelint-scss": "^6.3.0",
-    "typescript": "^5.4.5"
+    "typescript": "^5.4.5",
+    "typescript-eslint": "^7.11.0",
+    "vue-eslint-parser": "^9.4.2"
+  },
+  "dependencies": {
+    "uview-ui": "^2.0.37",
+    "vue": "^3.4.27"
   },
   },
   "lint-staged": {
   "lint-staged": {
-    "*.{vue,js,ts,jsx,tsx}": [
+    "**/*.{vue,js,ts,jsx,tsx}": [
       "pnpm format",
       "pnpm format",
       "pnpm lint"
       "pnpm lint"
     ],
     ],
-    "*.{css,scss,vue,html}": [
+    "**/*.{css,scss,vue,html}": [
       "pnpm format",
       "pnpm format",
       "pnpm lint:style"
       "pnpm lint:style"
     ]
     ]
-  },
-  "dependencies": {
-    "uview-ui": "^2.0.37"
   }
   }
 }
 }

+ 2 - 6
pages/index/index.vue

@@ -2,7 +2,7 @@
  * @Author: wjc
  * @Author: wjc
  * @Date: 2019-08-22 19:41:20
  * @Date: 2019-08-22 19:41:20
  * @LastEditors: wjc
  * @LastEditors: wjc
- * @LastEditTime: 2024-05-28 10:12:06
+ * @LastEditTime: 2024-05-28 11:26:08
  * @Description: 
  * @Description: 
 -->
 -->
 <template>
 <template>
@@ -22,11 +22,7 @@
       }
       }
     },
     },
     onLoad() {},
     onLoad() {},
-    methods: {
-      getData() {
-				let d = 1
-			},
-    },
+    methods: {},
   }
   }
 </script>
 </script>
 
 

ファイルの差分が大きいため隠しています
+ 427 - 118
pnpm-lock.yaml


+ 1 - 2
tsconfig.json

@@ -22,9 +22,8 @@
     "baseUrl": ".",
     "baseUrl": ".",
     "types": [],
     "types": [],
     "paths": {
     "paths": {
-      "@/*": ["src/*"],
+      "@/*": ["/*"],
       "#/*": ["types/*"],
       "#/*": ["types/*"],
-      "root/*": ["./*"]
     }
     }
   },
   },
   "include": [
   "include": [

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません