chore: 修改格式化规则

This commit is contained in:
2025-09-19 10:01:31 +08:00
parent 55242fc923
commit 668e851e9b
3 changed files with 4 additions and 42 deletions

View File

@@ -1,39 +0,0 @@
# vue-template
This template should help get you started developing with Vue 3 in Vite.
## Recommended IDE Setup
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
## Type Support for `.vue` Imports in TS
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
## Customize configuration
See [Vite Configuration Reference](https://vite.dev/config/).
## Project Setup
```sh
pnpm install
```
### Compile and Hot-Reload for Development
```sh
pnpm dev
```
### Type-Check, Compile and Minify for Production
```sh
pnpm build
```
### Lint with [ESLint](https://eslint.org/)
```sh
pnpm lint
```

View File

@@ -1,4 +1,4 @@
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
import prettierConfig from '@vue/eslint-config-prettier'
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
import importPlugin from 'eslint-plugin-import'
import prettierPlugin from 'eslint-plugin-prettier'
@@ -26,6 +26,7 @@ export default defineConfigWithVueTs(
prettier: prettierPlugin,
},
rules: {
'prettier/prettier': 'error',
'import/order': [
'error',
{
@@ -40,5 +41,5 @@ export default defineConfigWithVueTs(
},
},
skipFormatting,
prettierConfig,
)

View File

@@ -1,5 +1,5 @@
{
"extends": "@tsconfig/node22/tsconfig.json",
"extends": "./tsconfig.json",
"include": [
"vite.config.*",
"vitest.config.*",