diff --git a/.eslintrc.js b/.eslintrc.js index 987824e..aa6d58c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -17,14 +17,12 @@ module.exports = { sourceType: 'module', }, // 想要Linting规则的插件 https://eslint.org/docs/latest/user-guide/configuring/plugins - plugins: ['vue', '@typescript-eslint', 'prettier'], + plugins: ['vue', '@typescript-eslint'], // 指定扩展的配置,配置支持递归扩展,支持规则的覆盖和聚合。 extends: [ 'eslint:recommended', 'plugin:vue/vue3-recommended', - 'plugin:prettier/recommended', '@vue/eslint-config-typescript/recommended', - '@vue/eslint-config-prettier', '@vue/typescript/recommended', ], overrides: [ diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 46c69cf..0000000 --- a/.prettierignore +++ /dev/null @@ -1,40 +0,0 @@ -.DS_Store -node_modules -node_modules/**/* -node_modules/**/*.* -/dist - - -# local env files -.env.local -.env.*.local - -# Log files -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* - -# Editor directories and files -.idea -.vscode -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? - - -# 重要的环境依赖文件 -package.json -package.lock.json - -# 代码格式化插件的配置文件 -.prettierrc -.prettierignore - -# git忽略文件 -.gitignore - -# 不对markdown进行格式化, 容易打乱自己编排的样式 -*.md \ No newline at end of file diff --git a/.prettierrc.js b/.prettierrc.js deleted file mode 100644 index c3501b3..0000000 --- a/.prettierrc.js +++ /dev/null @@ -1,21 +0,0 @@ -module.exports = { - // https://prettier.io/docs/en/options.html - printWidth: 120, //单行长度 - tabWidth: 2, //缩进长度 - useTabs: false, //使用空格代替tab缩进 - semi: true, //句末使用分号 - singleQuote: true, //使用单引号 - quoteProps: 'as-needed', //仅在必需时为对象的key添加引号 - jsxSingleQuote: true, // jsx中使用单引号 - trailingComma: 'all', //多行时尽可能打印尾随逗号 - bracketSpacing: true, //在对象前后添加空格-eg: { foo: bar } - jsxBracketSameLine: true, //多属性html标签的‘>’折行放置 - arrowParens: 'always', //单参数箭头函数参数周围使用圆括号-eg: (x) => x - requirePragma: false, //无需顶部注释即可格式化 - insertPragma: false, //在已被preitter格式化的文件顶部加上标注 - proseWrap: 'preserve', //不知道怎么翻译 - htmlWhitespaceSensitivity: 'ignore', //对HTML全局空白不敏感 - vueIndentScriptAndStyle: false, //不对vue中的script及style标签缩进 - endOfLine: 'lf', //结束行形式 - embeddedLanguageFormatting: 'auto', //对引用代码进行格式化 -}; diff --git a/package.json b/package.json index c95f653..142e161 100644 --- a/package.json +++ b/package.json @@ -1,81 +1,84 @@ { - "name": "enchadmin", - "private": true, - "version": "0.0.0", - "scripts": { - "dev": "cross-env VITE_SERVICE_ENV=dev vite", - "dev:test": "cross-env VITE_SERVICE_ENV=test vite", - "dev:prod": "cross-env VITE_SERVICE_ENV=prod vite", - "build": "vue-tsc --noEmit && vite build", - "preview": "vite preview", - "prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"", - "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts,.json --fix", - "prepare": "husky install", - "commit": "cz", - "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md" - }, - "config": { - "commitizen": { - "path": "./node_modules/cz-customizable" - } - }, - "lint-staged": { - "./src/**/*.{vue,js,jsx,ts,tsx,json}": "eslint --fix", - "./src/**/*.{js,jsx,ts,tsx,less,json}": "prettier --loglevel warn --write" - }, - "dependencies": { - "@vueuse/core": "^9.3.0", - "@wangeditor/editor": "^5.1.21", - "@wangeditor/editor-for-vue": "^5.1.12", - "axios": "^0.27.2", - "echarts": "^5.4.0", - "md-editor-v3": "^2.3.0", - "pinia": "^2.0.20", - "pinia-plugin-persist": "^1.0.0", - "vue": "^3.2.37", - "vue-qr": "^4.0.9", - "vue-router": "^4.1.4" - }, - "devDependencies": { - "@commitlint/cli": "^17.0.3", - "@commitlint/config-conventional": "^17.0.3", - "@iconify-json/icon-park-outline": "^1.1.5", - "@iconify/vue": "^3.2.1", - "@types/mockjs": "^1.0.6", - "@types/node": "^18.7.13", - "@typescript-eslint/eslint-plugin": "^5.35.1", - "@typescript-eslint/parser": "^5.35.1", - "@unocss/preset-attributify": "^0.45.18", - "@unocss/preset-uno": "^0.45.18", - "@unocss/vite": "^0.45.18", - "@vitejs/plugin-vue": "^3.0.3", - "@vitejs/plugin-vue-jsx": "^2.0.0", - "@vue/eslint-config-prettier": "^7.0.0", - "@vue/eslint-config-typescript": "^11.0.0", - "commitizen": "^4.2.5", - "cross-env": "^7.0.3", - "cz-conventional-changelog": "^3.3.0", - "cz-customizable": "^6.9.1", - "eslint": "^8.22.0", - "eslint-config-prettier": "^8.5.0", - "eslint-import-resolver-alias": "^1.1.2", - "eslint-plugin-import": "^2.26.0", - "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-vue": "^9.4.0", - "husky": "^8.0.1", - "lint-staged": "^13.0.3", - "mockjs": "^1.1.0", - "naive-ui": "^2.32.2", - "prettier": "^2.7.1", - "rollup-plugin-visualizer": "^5.8.0", - "typescript": "^4.7.4", - "unplugin-icons": "^0.14.8", - "unplugin-vue-components": "^0.22.4", - "vite": "^3.0.9", - "vite-plugin-compression": "^0.5.1", - "vite-plugin-html": "^3.2.0", - "vite-plugin-mock": "^2.9.6", - "vite-plugin-svg-icons": "^2.0.1", - "vue-tsc": "^0.40.1" - } + "name": "ench-admin", + "private": true, + "version": "0.0.1", + "description": "", + "author": "iam see (https://github.com/iam-see/)", + "license": "MIT", + "homepage": "https://github.com/iam-see/Ench-admin", + "keywords": [ + "Vue", + "Vue3", + "admin" + ], + "scripts": { + "dev": "cross-env VITE_SERVICE_ENV=dev vite", + "dev:test": "cross-env VITE_SERVICE_ENV=test vite", + "dev:prod": "cross-env VITE_SERVICE_ENV=prod vite", + "build": "vue-tsc --noEmit && vite build", + "preview": "vite preview", + "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts,.json --fix", + "prepare": "husky install", + "commit": "cz", + "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md" + }, + "config": { + "commitizen": { + "path": "./node_modules/cz-customizable" + } + }, + "lint-staged": { + "./src/**/*.{vue,js,jsx,ts,tsx,json}": "eslint --fix" + }, + "dependencies": { + "@vueuse/core": "^9.3.0", + "@wangeditor/editor": "^5.1.21", + "@wangeditor/editor-for-vue": "^5.1.12", + "axios": "^0.27.2", + "echarts": "^5.4.0", + "md-editor-v3": "^2.3.0", + "pinia": "^2.0.20", + "pinia-plugin-persist": "^1.0.0", + "vue": "^3.2.37", + "vue-qr": "^4.0.9", + "vue-router": "^4.1.4" + }, + "devDependencies": { + "@commitlint/cli": "^17.0.3", + "@commitlint/config-conventional": "^17.0.3", + "@iconify-json/icon-park-outline": "^1.1.5", + "@iconify/vue": "^3.2.1", + "@types/mockjs": "^1.0.6", + "@types/node": "^18.7.13", + "@typescript-eslint/eslint-plugin": "^5.35.1", + "@typescript-eslint/parser": "^5.35.1", + "@unocss/preset-attributify": "^0.45.18", + "@unocss/preset-uno": "^0.45.18", + "@unocss/vite": "^0.45.18", + "@vitejs/plugin-vue": "^3.0.3", + "@vitejs/plugin-vue-jsx": "^2.0.0", + "@vue/eslint-config-typescript": "^11.0.0", + "commitizen": "^4.2.5", + "cross-env": "^7.0.3", + "cz-conventional-changelog": "^3.3.0", + "cz-customizable": "^6.9.1", + "eslint": "^8.22.0", + "eslint-import-resolver-alias": "^1.1.2", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-vue": "^9.4.0", + "husky": "^8.0.1", + "lint-staged": "^13.0.3", + "mockjs": "^1.1.0", + "naive-ui": "^2.32.2", + "rollup-plugin-visualizer": "^5.8.0", + "typescript": "^4.7.4", + "unplugin-icons": "^0.14.8", + "unplugin-vue-components": "^0.22.4", + "vite": "^3.0.9", + "vite-plugin-compression": "^0.5.1", + "vite-plugin-html": "^3.2.0", + "vite-plugin-mock": "^2.9.6", + "vite-plugin-svg-icons": "^2.0.1", + "vue-tsc": "^0.40.1" + } }