chore(project): 删除prettie

This commit is contained in:
Coffee-crocodile 2022-11-11 16:03:17 +08:00
parent af8ceb0843
commit 9eff695622
4 changed files with 83 additions and 143 deletions

View File

@ -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: [

View File

@ -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

View File

@ -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', //对引用代码进行格式化
};

View File

@ -1,14 +1,22 @@
{
"name": "enchadmin",
"name": "ench-admin",
"private": true,
"version": "0.0.0",
"version": "0.0.1",
"description": "",
"author": "iam see <chen.dev@foxmail.com> (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",
"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",
@ -20,8 +28,7 @@
}
},
"lint-staged": {
"./src/**/*.{vue,js,jsx,ts,tsx,json}": "eslint --fix",
"./src/**/*.{js,jsx,ts,tsx,less,json}": "prettier --loglevel warn --write"
"./src/**/*.{vue,js,jsx,ts,tsx,json}": "eslint --fix"
},
"dependencies": {
"@vueuse/core": "^9.3.0",
@ -50,23 +57,19 @@
"@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",