chore: set eslint max-warnings option and remove unused imports (#3822)

#### What type of PR is this?

/kind improvement
/area console

#### What this PR does / why we need it:

调整 ESLint 的执行参数,添加 max-warnings 为 0,意味着在提交或者运行 CI 的时候不再允许包含 warning 级别的检测。

#### Does this PR introduce a user-facing change?

```release-note
None
```
pull/3824/head
Ryan Wang 2023-04-23 12:37:33 +08:00 committed by GitHub
parent 9e0fc8283f
commit 629a620668
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 7 deletions

View File

@ -15,7 +15,7 @@
"test:e2e": "start-server-and-test preview http://127.0.0.1:5050/ 'cypress open'",
"test:e2e:ci": "start-server-and-test preview http://127.0.0.1:5050/ 'cypress run'",
"typecheck": "vue-tsc --noEmit -p tsconfig.app.json --composite false && pnpm run typecheck:packages",
"lint": "eslint ./src --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --ignore-path .gitignore && pnpm run lint:packages",
"lint": "eslint ./src --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --ignore-path .gitignore --max-warnings=0 && pnpm run lint:packages",
"prettier": "prettier --write './src/**/*.{vue,js,jsx,ts,tsx,css,scss,json,yml,yaml,html}' && pnpm run prettier:packages",
"typecheck:packages": "pnpm --parallel --filter \"./packages/**\" run typecheck",
"lint:packages": "pnpm --parallel --filter \"./packages/**\" lint",
@ -27,7 +27,7 @@
"prettier --write"
],
"*.{js,ts,vue,tsx,jsx}": [
"eslint --fix"
"eslint --fix --max-warnings=0"
]
},
"workspaces": [

View File

@ -1,13 +1,10 @@
<script lang="ts" setup>
// core libs
import { inject, ref } from "vue";
import { RouterLink } from "vue-router";
import { useThemeLifeCycle } from "./composables/use-theme";
// components
import {
VAlert,
VSpace,
VTag,
IconMore,
Dialog,

View File

@ -1,13 +1,11 @@
<script lang="ts" setup>
import {
IconArrowRight,
IconShieldUser,
VButton,
VCard,
VPageHeader,
VTabbar,
VTag,
VAvatar,
VAlert,
VDescription,
VDescriptionItem,