Browse Source

style: format code

nian 2 months ago
parent
commit
034f33109f
4 changed files with 12 additions and 10 deletions
  1. 3 0
      README.md
  2. 4 5
      eslint.config.ts
  3. 1 1
      index.html
  4. 4 4
      package.json

+ 3 - 0
README.md

@@ -83,6 +83,7 @@ pnpm format:check
 # 自动格式化代码
 pnpm format:fix
 ```
+
 ## 🗳️ 图标
 
 图标库使用 [Iconify](https://iconify.design),使用方式如下:
@@ -94,7 +95,9 @@ pnpm format:fix
 <!-- 直接使用 -->
 <span class="iconify-[fluent--data-area-32-regular]"></span>
 ```
+
 上面的 `ph` 前缀需要在 `src/assets/main.css` 中进行配置,详细文档请参考 [Iconify Tailwind 4](https://iconify.design/docs/usage/css/tailwind/tailwind4)
+
 ```css
 @plugin "@iconify/tailwind4" {
   prefixes: ph;

+ 4 - 5
eslint.config.ts

@@ -7,7 +7,6 @@ import perfectionist from 'eslint-plugin-perfectionist'
 import pluginVue from 'eslint-plugin-vue'
 import { globalIgnores } from 'eslint/config'
 
-
 // More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup
 configureVueProject({ scriptLangs: ['ts', 'tsx'] })
 
@@ -29,13 +28,13 @@ export default defineConfigWithVueTs(
   skipFormatting,
   {
     plugins: {
-      perfectionist
+      perfectionist,
     },
     rules: {
       // vue
       'vue/multi-word-component-names': 'off',
 
-       // typescript
+      // typescript
       '@typescript-eslint/ban-ts-comment': 'off',
       '@typescript-eslint/no-empty-object-type': 'off',
       '@typescript-eslint/no-explicit-any': 'off',
@@ -49,6 +48,6 @@ export default defineConfigWithVueTs(
           groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'type'],
         },
       ],
-    }
-  }
+    },
+  },
 )

+ 1 - 1
index.html

@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!doctype html>
 <html>
   <head>
     <meta charset="UTF-8" />

+ 4 - 4
package.json

@@ -13,10 +13,10 @@
     "test:unit": "vitest",
     "build-only": "vite build",
     "type-check": "vue-tsc --build",
-    "lint:check": "eslint .",
-    "lint:fix": "eslint . --fix",
-    "format:check": "prettier --check src/",
-    "format:fix": "prettier --write src/"
+    "lint:check": "eslint src/",
+    "lint:fix": "eslint src/ --fix",
+    "format:check": "prettier --check .",
+    "format:fix": "prettier --write ."
   },
   "dependencies": {
     "@vueuse/core": "^13.6.0",