chore: 修改格式化规则
This commit is contained in:
39
README.md
39
README.md
@@ -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
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -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 { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
|
||||||
import importPlugin from 'eslint-plugin-import'
|
import importPlugin from 'eslint-plugin-import'
|
||||||
import prettierPlugin from 'eslint-plugin-prettier'
|
import prettierPlugin from 'eslint-plugin-prettier'
|
||||||
@@ -26,6 +26,7 @@ export default defineConfigWithVueTs(
|
|||||||
prettier: prettierPlugin,
|
prettier: prettierPlugin,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
'prettier/prettier': 'error',
|
||||||
'import/order': [
|
'import/order': [
|
||||||
'error',
|
'error',
|
||||||
{
|
{
|
||||||
@@ -40,5 +41,5 @@ export default defineConfigWithVueTs(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
skipFormatting,
|
prettierConfig,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": "@tsconfig/node22/tsconfig.json",
|
"extends": "./tsconfig.json",
|
||||||
"include": [
|
"include": [
|
||||||
"vite.config.*",
|
"vite.config.*",
|
||||||
"vitest.config.*",
|
"vitest.config.*",
|
||||||
|
|||||||
Reference in New Issue
Block a user