From 1a193821d180cf06570c1b85a956a892ab4206a0 Mon Sep 17 00:00:00 2001 From: saatana <1041367524@qq.com> Date: Wed, 23 Mar 2022 15:37:54 +0800 Subject: [PATCH] =?UTF-8?q?conf:=20eslint=E6=8A=A5=E9=94=99=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- package.json | 125 ++++++++++++++++--------------- vite.config.ts => vite.config.js | 3 +- 3 files changed, 65 insertions(+), 65 deletions(-) rename vite.config.ts => vite.config.js (96%) diff --git a/.gitignore b/.gitignore index aedec16..bc542c2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.elintchache +.eslintcache node_modules dist *.local diff --git a/package.json b/package.json index 1ce70fb..14aa746 100644 --- a/package.json +++ b/package.json @@ -1,64 +1,65 @@ { - "name": "msb-shop-admin", - "author": { - "name": "向文可", - "email": "1041367524@qq.com" - }, - "private": true, - "version": "0.0.1", - "scripts": { - "dev": "vite", - "build:test": "vite build --mode test", - "build:preview": "vite build --mode preview", - "build:prod": "vite build --mode prod", - "preview": "vite preview", - "prepare": "husky install", - "lint": "eslint src/**/*.{vue,js,jsx} --fix" - }, - "dependencies": { - "@element-plus/icons": "^0.0.11", - "@vueup/vue-quill": "^1.0.0-beta.8", - "axios": "^0.26.1", - "dayjs": "^1.11.0", - "element-plus": "^2.1.2", - "lodash": "^4.17.21", - "qs": "^6.10.3", - "quill-image-uploader": "^1.2.2", - "sortablejs": "^1.14.0", - "vue": "^3.2.25", - "vue-router": "^4.0.14", - "vuex": "^4.0.2" - }, - "devDependencies": { - "@commitlint/cli": "^13.2.1", - "@commitlint/config-conventional": "^13.2.0", - "@commitlint/prompt-cli": "^13.2.1", - "@nabla/vite-plugin-eslint": "^1.4.0", - "@originjs/vite-plugin-global-style": "^1.0.2", - "@types/node": "^17.0.21", - "@vitejs/plugin-legacy": "^1.7.1", - "@vitejs/plugin-vue": "^2.2.0", - "@vitejs/plugin-vue-jsx": "^1.3.8", - "consola": "^2.15.3", - "eslint": "^8.11.0", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-prettier": "^4.0.0", - "eslint-plugin-vue": "^8.5.0", - "husky": "^7.0.4", - "less": "^4.1.2", - "lint-staged": "^12.3.7", - "prettier": "^2.6.0", - "unplugin-auto-import": "^0.6.4", - "unplugin-vue-components": "^0.18.0", - "vite": "^2.8.0", - "vite-plugin-remove-console": "^0.0.6", - "vite-plugin-style-import": "^2.0.0", - "vite-plugin-svg-icons": "^2.0.1" - }, - "lint-staged": { - "src/**/*.{jsx,tsx,ts,js,vue}": [ - "prettier --write", - "eslint --fix" - ] - } + "name": "msb-shop-admin", + "author": { + "name": "向文可", + "email": "1041367524@qq.com" + }, + "private": true, + "version": "0.0.1", + "scripts": { + "dev": "vite", + "build:test": "vite build --mode test", + "build:preview": "vite build --mode preview", + "build:prod": "vite build --mode prod", + "preview": "vite preview", + "prepare": "husky install", + "lint": "eslint src/**/*.{vue,js,jsx} --fix" + }, + "dependencies": { + "@element-plus/icons": "^0.0.11", + "@vueup/vue-quill": "^1.0.0-beta.8", + "axios": "^0.26.1", + "dayjs": "^1.11.0", + "element-plus": "^2.1.2", + "lodash": "^4.17.21", + "qs": "^6.10.3", + "quill-image-uploader": "^1.2.2", + "sortablejs": "^1.14.0", + "vue": "^3.2.25", + "vue-router": "^4.0.14", + "vuex": "^4.0.2" + }, + "devDependencies": { + "@commitlint/cli": "^13.2.1", + "@commitlint/config-conventional": "^13.2.0", + "@commitlint/prompt-cli": "^13.2.1", + "@nabla/vite-plugin-eslint": "^1.4.0", + "@originjs/vite-plugin-global-style": "^1.0.2", + "@types/node": "^17.0.21", + "@vitejs/plugin-legacy": "^1.7.1", + "@vitejs/plugin-vue": "^2.2.0", + "@vitejs/plugin-vue-jsx": "^1.3.8", + "airbnb": "^0.0.2", + "consola": "^2.15.3", + "eslint": "^8.11.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-prettier": "^4.0.0", + "eslint-plugin-vue": "^8.5.0", + "husky": "^7.0.4", + "less": "^4.1.2", + "lint-staged": "^12.3.7", + "prettier": "^2.6.0", + "unplugin-auto-import": "^0.6.4", + "unplugin-vue-components": "^0.18.0", + "vite": "^2.8.0", + "vite-plugin-remove-console": "^0.0.6", + "vite-plugin-style-import": "^2.0.0", + "vite-plugin-svg-icons": "^2.0.1" + }, + "lint-staged": { + "src/**/*.{jsx,tsx,ts,js,vue}": [ + "prettier --write", + "eslint --fix" + ] + } } diff --git a/vite.config.ts b/vite.config.js similarity index 96% rename from vite.config.ts rename to vite.config.js index 1e0d7fb..f6d1ea4 100644 --- a/vite.config.ts +++ b/vite.config.js @@ -1,4 +1,3 @@ -import { UserConfigExport, ConfigEnv } from 'vite'; import { resolve } from 'path'; import vue from '@vitejs/plugin-vue'; @@ -13,7 +12,7 @@ import removeConsole from 'vite-plugin-remove-console'; import legacy from '@vitejs/plugin-legacy'; import eslintPlugin from '@nabla/vite-plugin-eslint'; -export default ({ command, mode }: ConfigEnv): UserConfigExport => { +export default ({ command, mode }) => { console.info('command', command); console.info('mode', mode); return {