Skip to content

chore(deps): ⬆️ upgrade deps #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .eslintrc

This file was deleted.

38 changes: 36 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,41 @@
{
// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,

// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,

// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
"source.fixAll": "explicit",
"source.organizeImports": "never"
},

// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{ "rule": "style/*", "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",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml"
]
}
12 changes: 11 additions & 1 deletion auto-imports.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
// Generated by 'unplugin-auto-import'
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import
export {}
declare global {
const EffectScope: typeof import('vue')['EffectScope']
Expand Down Expand Up @@ -56,6 +60,7 @@ declare global {
const toRaw: typeof import('vue')['toRaw']
const toRef: typeof import('vue')['toRef']
const toRefs: typeof import('vue')['toRefs']
const toValue: typeof import('vue')['toValue']
const triggerRef: typeof import('vue')['triggerRef']
const unref: typeof import('vue')['unref']
const useAttrs: typeof import('vue')['useAttrs']
Expand All @@ -72,3 +77,8 @@ declare global {
const watchPostEffect: typeof import('vue')['watchPostEffect']
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
}
// for type re-export
declare global {
// @ts-ignore
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
}
9 changes: 6 additions & 3 deletions build/mock/createMockServer.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
const { join } = require('path')
const url = require('url')
/* eslint-disable node/prefer-global/process */
const { join } = require('node:path')
const url = require('node:url')
const chokidar = require('chokidar')
const signale = require('signale')
const { match } = require('path-to-regexp')
const { initMock, getMatchMock } = require('./getMockData')
const { winPath } = require('./utils')
const { configBabelRegister } = require('./registerBabel')

let watcher
function getPaths(cwd) {
const winCwd = winPath(cwd)
Expand Down Expand Up @@ -95,7 +97,8 @@ module.exports = function (opts) {
let queryParams = {}

if (req.url)
// eslint-disable-next-line n/no-deprecated-api

// eslint-disable-next-line node/no-deprecated-api
queryParams = url.parse(req.url, true)

const reqUrl = queryParams.pathname
Expand Down
4 changes: 3 additions & 1 deletion build/mock/getMockData.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
const path = require('path')
const path = require('node:path')
const glob = require('glob')
const { pathToRegexp } = require('path-to-regexp')
const signale = require('signale')
const { winPath } = require('./utils')

let _mockconfig = {}
// eslint-disable-next-line node/prefer-global/process
const cwd = process.cwd()
let mockList = []
// 获取mock文件列表
Expand Down
6 changes: 4 additions & 2 deletions build/mock/registerBabel.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const { join, isAbsolute } = require('path')
const { existsSync } = require('fs')
/* eslint-disable node/prefer-global/process */
const { join, isAbsolute } = require('node:path')
const { existsSync } = require('node:fs')
const { winPath } = require('./utils')

let files = null

function initFiles(cwd) {
Expand Down
10 changes: 5 additions & 5 deletions components.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// generated by unplugin-vue-components
// We suggest you to commit this file into source control
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
import '@vue/runtime-core'

export {}

declare module '@vue/runtime-core' {
declare module 'vue' {
export interface GlobalComponents {
Chart: typeof import('./src/components/chart/index.vue')['default']
VanButton: typeof import('vant/es')['Button']
Expand Down
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const antfu = require('@antfu/eslint-config').default

module.exports = antfu()
74 changes: 37 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,59 +17,59 @@
},
"dependencies": {
"@vant/touch-emulator": "^1.4.0",
"@vant/use": "^1.5.1",
"axios": "^1.4.0",
"echarts": "^5.4.2",
"@vant/use": "^1.6.0",
"axios": "^1.5.1",
"echarts": "^5.4.3",
"lodash-es": "^4.17.21",
"nprogress": "^0.2.0",
"pinia": "^2.1.3",
"pinia-plugin-persistedstate": "^3.1.0",
"pinia": "^2.1.7",
"pinia-plugin-persistedstate": "^3.2.0",
"resize-detector": "^0.3.0",
"store": "^2.0.12",
"vant": "^4.4.1",
"vant": "^4.7.2",
"vconsole": "^3.15.1",
"vue": "^3.3.4",
"vue-router": "^4.2.2",
"vue": "^3.3.6",
"vue-router": "^4.2.5",
"vue-router-better-scroller": "^0.0.0"
},
"devDependencies": {
"@antfu/eslint-config": "^0.33.1",
"@babel/core": "^7.22.1",
"@babel/preset-env": "^7.22.4",
"@babel/preset-typescript": "^7.21.5",
"@babel/register": "^7.21.0",
"@types/lodash-es": "^4.17.7",
"@types/node": "^18.16.16",
"@types/nprogress": "^0.2.0",
"@types/store": "^2.0.2",
"@vitejs/plugin-legacy": "^3.0.2",
"@vitejs/plugin-vue": "^4.2.3",
"@vitejs/plugin-vue-jsx": "^3.0.1",
"autoprefixer": "^10.4.14",
"babel-plugin-module-resolver": "^4.1.0",
"@antfu/eslint-config": "1.0.0-beta.28",
"@babel/core": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@babel/preset-typescript": "^7.23.2",
"@babel/register": "^7.22.15",
"@types/lodash-es": "^4.17.10",
"@types/node": "^20.8.7",
"@types/nprogress": "^0.2.2",
"@types/store": "^2.0.4",
"@vitejs/plugin-legacy": "^4.1.1",
"@vitejs/plugin-vue": "^4.4.0",
"@vitejs/plugin-vue-jsx": "^3.0.2",
"autoprefixer": "^10.4.16",
"babel-plugin-module-resolver": "^5.0.0",
"commitizen": "^4.3.0",
"consola": "^2.15.3",
"consola": "^3.2.3",
"cross-env": "^7.0.3",
"cz-emoji-chinese": "^0.3.1",
"eslint": "^8.42.0",
"eslint": "^8.52.0",
"husky": "^8.0.3",
"less": "^4.1.3",
"less": "^4.2.0",
"mockjs": "^1.1.0",
"path-to-regexp": "^6.2.1",
"plop": "^3.1.2",
"postcss-mobile-forever": "^3.3.2",
"rollup": "^3.24.0",
"rollup-plugin-visualizer": "^5.9.0",
"plop": "^4.0.0",
"postcss-mobile-forever": "^4.0.0",
"rollup": "^4.1.4",
"rollup-plugin-visualizer": "^5.9.2",
"signale": "^1.4.0",
"slash2": "^2.0.0",
"terser": "^5.17.7",
"typescript": "^4.9.5",
"unplugin-auto-import": "^0.12.2",
"unplugin-vue-components": "^0.22.12",
"vite": "^4.3.9",
"vite-plugin-vconsole": "^1.3.1",
"vitest": "^0.25.8",
"vue-tsc": "^1.6.5"
"terser": "^5.22.0",
"typescript": "^5.2.2",
"unplugin-auto-import": "^0.16.6",
"unplugin-vue-components": "^0.25.2",
"vite": "^4.5.0",
"vite-plugin-vconsole": "^2.0.1",
"vitest": "^0.34.6",
"vue-tsc": "^1.8.19"
},
"pnpm": {
"peerDependencyRules": {
Expand Down
15 changes: 5 additions & 10 deletions plop-templates/component/prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,30 @@ module.exports = {
name: 'name',
message: 'component name please',
validate: notEmpty('name'),
},
{
}, {
type: 'checkbox',
name: 'blocks',
message: 'Blocks:',
choices: [{
name: '<template>',
value: 'template',
checked: true,
},
{
}, {
name: '<script>',
value: 'script',
checked: true,
},
{
}, {
name: 'style',
value: 'style',
checked: true,
},
],
}],
validate(value) {
if (!value.includes('script') && !value.includes('template'))
return 'Components require at least a <script> or <template> tag.'

return true
},
},
],
}],
actions: (data) => {
const name = '{{properCase name}}'
const actions = [{
Expand Down
15 changes: 5 additions & 10 deletions plop-templates/view/prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,30 @@ module.exports = {
name: 'name',
message: 'view name please',
validate: notEmpty('name'),
},
{
}, {
type: 'checkbox',
name: 'blocks',
message: 'Blocks:',
choices: [{
name: '<template>',
value: 'template',
checked: true,
},
{
}, {
name: '<script>',
value: 'script',
checked: true,
},
{
}, {
name: 'style',
value: 'style',
checked: true,
},
],
}],
validate(value) {
if (!value.includes('script') && !value.includes('template'))
return 'View require at least a <script> or <template> tag.'

return true
},
},
],
}],
actions: (data) => {
const name = '{{name}}'
const actions = [{
Expand Down
1 change: 1 addition & 0 deletions plopfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const viewGenerator = require('./plop-templates/view/prompt')
const componentGenerator = require('./plop-templates/component/prompt')

module.exports = function (plop) {
plop.setGenerator('view', viewGenerator)
plop.setGenerator('component', componentGenerator)
Expand Down
Loading