Skip to content

Commit

Permalink
chore: simplified deps
Browse files Browse the repository at this point in the history
  • Loading branch information
chansee97 committed Feb 29, 2024
1 parent 1dc8aea commit d700af4
Show file tree
Hide file tree
Showing 14 changed files with 104 additions and 140 deletions.
50 changes: 0 additions & 50 deletions .cz-config.js

This file was deleted.

9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
2 changes: 0 additions & 2 deletions .env.prod
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ VITE_COMPRESS_OPEN=N
# 压缩算法 gzip | brotliCompress | deflate | deflateRaw
VITE_COMPRESS_TYPE=gzip

# 是否开启打包依赖分析
VITE_VISUALIZER=N
15 changes: 0 additions & 15 deletions .eslintrc.js

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

57 changes: 53 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,58 @@
{
"editor.tabSize": 2,
// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,
// Disable the default formatter, use eslint instead
"prettier.enable": false,
"eslint.format.enable": true,
"editor.formatOnSave": false,
// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{
"rule": "style/*",
"severity": "off"
},
{
"rule": "format/*",
"severity": "off"
},
{
"rule": "*-indent",
"severity": "off"
},
{
"rule": "*-spacing",
"severity": "off"
},
{
"rule": "*-spaces",
"severity": "off"
},
{
"rule": "*-order",
"severity": "off"
},
{
"rule": "*-dangle",
"severity": "off"
},
{
"rule": "*-newline",
"severity": "off"
},
{
"rule": "*quotes",
"severity": "off"
},
{
"rule": "*semi",
"severity": "off"
}
],
// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
Expand All @@ -15,6 +63,7 @@
"markdown",
"json",
"jsonc",
"yaml"
"yaml",
"toml"
]
}
5 changes: 0 additions & 5 deletions build/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type { PluginOption } from 'vite'
import UnoCSS from '@unocss/vite'
import vue from './vue'
import compress from './compress'
import visualizer from './visualizer'
import unplugin from './unplugin'
import mock from './mock'

Expand All @@ -19,9 +18,5 @@ export function setVitePlugins(env: ImportMetaEnv) {
if (env.VITE_COMPRESS_OPEN === 'Y')
plugins.push(compress(env))

// 是否依赖分析
if (env.VITE_VISUALIZER === 'Y')
plugins.push(visualizer as PluginOption)

return plugins
}
7 changes: 0 additions & 7 deletions build/plugins/visualizer.ts

This file was deleted.

1 change: 0 additions & 1 deletion commitlint.config.js

This file was deleted.

5 changes: 5 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// eslint.config.js
import antfu from '@antfu/eslint-config'

// https://github.com/antfu/eslint-config
export default antfu()
81 changes: 36 additions & 45 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,68 +44,59 @@
"build:test": "vue-tsc --noEmit && vite build --mode test",
"preview": "vite preview",
"lint": "eslint . --fix",
"prepare": "husky install",
"commit": "cz",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md"
"sizecheck": "npx vite-bundle-visualizer"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-customizable"
}
},
"dependencies": {
"@tinymce/tinymce-vue": "^5.1.0",
"@vueuse/core": "^10.2.0",
"axios": "^1.4.0",
"crypto-js": "^4.1.1",
"echarts": "^5.4.2",
"md-editor-v3": "^4.2.0",
"pinia": "^2.1.4",
"@tinymce/tinymce-vue": "^5.1.1",
"@vueuse/core": "^10.9.0",
"axios": "^1.6.7",
"crypto-js": "^4.2.0",
"echarts": "^5.5.0",
"md-editor-v3": "^4.11.3",
"pinia": "^2.1.7",
"pinia-plugin-persist": "^1.0.0",
"qs": "^6.11.2",
"vue": "^3.3.4",
"vue": "^3.4.21",
"vue-qr": "^4.0.9",
"vue-router": "^4.2.2"
"vue-router": "^4.3.0"
},
"devDependencies": {
"@chansee97/eslint-config-vue": "^0.3.5",
"@commitlint/cli": "^17.6.5",
"@commitlint/config-conventional": "^17.6.5",
"@iconify-json/icon-park-outline": "^1.1.11",
"@antfu/eslint-config": "^2.6.4",
"@iconify-json/icon-park-outline": "^1.1.15",
"@iconify/vue": "^4.1.1",
"@types/crypto-js": "^4.1.1",
"@types/mockjs": "^1.0.7",
"@types/node": "^20.3.1",
"@types/qs": "^6.9.7",
"@vitejs/plugin-vue": "^4.2.3",
"@vitejs/plugin-vue-jsx": "^3.0.0",
"commitizen": "^4.2.6",
"cz-conventional-changelog": "^3.3.0",
"cz-customizable": "^7.0.0",
"eslint": "^8.43.0",
"husky": "^8.0.3",
"less": "^4.1.3",
"lint-staged": "^13.2.2",
"@types/crypto-js": "^4.2.2",
"@types/mockjs": "^1.0.10",
"@types/node": "^20.11.22",
"@types/qs": "^6.9.12",
"@vitejs/plugin-vue": "^5.0.4",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"eslint": "^8.57.0",
"lint-staged": "^15.2.2",
"mockjs": "^1.1.0",
"naive-ui": "^2.34.4",
"rollup-plugin-visualizer": "^5.9.0",
"typescript": "^5.0.0",
"unocss": "^0.53.1",
"unplugin-auto-import": "^0.16.4",
"unplugin-icons": "^0.16.3",
"unplugin-vue-components": "^0.25.1",
"vite": "^4.3.9",
"naive-ui": "^2.38.1",
"sass": "^1.71.1",
"simple-git-hooks": "^2.9.0",
"typescript": "^5.3.3",
"unocss": "^0.58.5",
"unplugin-auto-import": "^0.17.5",
"unplugin-icons": "^0.18.5",
"unplugin-vue-components": "^0.26.0",
"vite": "^5.1.4",
"vite-bundle-visualizer": "^1.0.1",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-mock": "^2.9.8",
"vite-plugin-mock": "^3.0.1",
"vite-plugin-svg-icons": "^2.0.1",
"vue-tsc": "^1.8.1"
"vue-tsc": "^1.8.27"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
},
"lint-staged": {
"*.{js,jsx,mjs,ts,tsx,json,md,yml}": [
"eslint --fix"
],
"*.vue": [
"eslint --fix"
]
"*": "eslint --fix"
}
}
2 changes: 0 additions & 2 deletions src/typings/env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ interface ImportMetaEnv {
readonly VITE_APP_NAME: string
/** 开启请求代理 */
readonly VITE_HTTP_PROXY?: 'Y' | 'N'
/** 是否开启打包依赖分析 */
readonly VITE_VISUALIZER?: 'Y' | 'N'
/** 是否开启打包压缩 */
readonly VITE_COMPRESS_OPEN?: 'Y' | 'N'
/** 压缩算法类型 */
Expand Down
2 changes: 1 addition & 1 deletion src/views/login/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const formComponets = {
</div>
</template>

<style scoped lang="less">
<style scoped lang="scss">
.login__bg {
background-image: url(@/assets/img/login-bg.webp);
position: relative;
Expand Down

0 comments on commit d700af4

Please sign in to comment.