diff --git a/.eslintrc-auto-import.json b/.eslintrc-auto-import.json new file mode 100644 index 00000000..9dffc564 --- /dev/null +++ b/.eslintrc-auto-import.json @@ -0,0 +1,83 @@ +{ + "globals": { + "Component": true, + "ComponentPublicInstance": true, + "ComputedRef": true, + "EffectScope": true, + "ExtractDefaultPropTypes": true, + "ExtractPropTypes": true, + "ExtractPublicPropTypes": true, + "InjectionKey": true, + "PropType": true, + "Ref": true, + "VNode": true, + "WritableComputedRef": true, + "acceptHMRUpdate": true, + "computed": true, + "createApp": true, + "createPinia": true, + "customRef": true, + "defineAsyncComponent": true, + "defineComponent": true, + "defineStore": true, + "effectScope": true, + "getActivePinia": true, + "getCurrentInstance": true, + "getCurrentScope": true, + "h": true, + "inject": true, + "isProxy": true, + "isReactive": true, + "isReadonly": true, + "isRef": true, + "mapActions": true, + "mapGetters": true, + "mapState": true, + "mapStores": true, + "mapWritableState": true, + "markRaw": true, + "nextTick": true, + "onActivated": true, + "onBeforeMount": true, + "onBeforeUnmount": true, + "onBeforeUpdate": true, + "onDeactivated": true, + "onErrorCaptured": true, + "onMounted": true, + "onRenderTracked": true, + "onRenderTriggered": true, + "onScopeDispose": true, + "onServerPrefetch": true, + "onUnmounted": true, + "onUpdated": true, + "provide": true, + "reactive": true, + "readonly": true, + "ref": true, + "resolveComponent": true, + "setActivePinia": true, + "setMapStoreSuffix": true, + "shallowReactive": true, + "shallowReadonly": true, + "shallowRef": true, + "storeToRefs": true, + "toRaw": true, + "toRef": true, + "toRefs": true, + "toValue": true, + "triggerRef": true, + "unref": true, + "useAttrs": true, + "useCssModule": true, + "useCssVars": true, + "useSlots": true, + "watch": true, + "watchEffect": true, + "watchPostEffect": true, + "watchSyncEffect": true, + "useData": true, + "useRoute": true, + "useRouter": true, + "withBase": true + } +} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 30e9beee..b66078cb 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,10 +14,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install pnpm 📥 - uses: pnpm/action-setup@v2 + uses: pnpm/action-setup@v3 with: version: 8 run_install: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5ddc8b99..d58fde46 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,8 +13,7 @@ jobs: release-please: runs-on: ubuntu-latest steps: - - uses: google-github-actions/release-please-action@v3 + - uses: google-github-actions/release-please-action@v4 with: release-type: node - package-name: release-please-action token: ${{ secrets.ACCESS_TOKEN }} diff --git a/eslint.config.js b/eslint.config.js index 9593768b..6f6f3f77 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,30 +1,38 @@ import antfu from '@antfu/eslint-config' +import { createRequire } from 'node:module' -export default antfu({ - typescript: false, - markdown: false, - ignores: [ - 'node_modules', - 'src/notes/public', - 'dist', - 'index.html', - ], -}, { - rules: { - 'jsdoc/check-param-names': 'off', - 'jsdoc/check-types': 'off', - 'jsdoc/require-returns-description': 'off', +const require = createRequire(import.meta.url) - 'node/prefer-global/process': 'off', +const autoImport = require('./.eslintrc-auto-import.json') - 'no-console': 'off', - 'curly': 'off', - 'eqeqeq': 'off', - 'no-unused-vars': 'off', +export default antfu( + { + typescript: false, + markdown: false, + ignores: ['node_modules', 'src/notes/public', 'dist', 'index.html'], + }, + { + languageOptions: { + globals: { + ...autoImport.globals, + }, + }, + rules: { + 'jsdoc/check-param-names': 'off', + 'jsdoc/check-types': 'off', + 'jsdoc/require-returns-description': 'off', - 'unused-imports/no-unused-vars': 'off', + 'node/prefer-global/process': 'off', - 'vue/html-self-closing': 'off', - 'vue/block-order': 'off', - }, -}) + 'no-console': 'off', + curly: 'off', + eqeqeq: 'off', + 'no-unused-vars': 'off', + + 'unused-imports/no-unused-vars': 'off', + + 'vue/html-self-closing': 'off', + 'vue/block-order': 'off', + }, + } +) diff --git a/package.json b/package.json index 8dfb39cd..876aebfd 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,8 @@ "name": "viarotel-site", "type": "module", "version": "1.7.0", - "packageManager": "pnpm@8.7.4", - "description": "Viarotel site", + "packageManager": "pnpm@8.15.7", + "description": "viarotel site", "author": "viarotel", "license": "ISC", "keywords": [], @@ -15,23 +15,25 @@ "lint:fix": "eslint . --fix" }, "dependencies": { - "@lottiefiles/lottie-player": "^1.7.1", - "@waline/client": "^3.1.1", - "dayjs": "^1.11.7", - "ga-gtag": "^1.1.7", - "gsap": "^3.11.5", + "@lottiefiles/lottie-player": "^2.0.4", + "@waline/client": "^3.1.3", + "dayjs": "^1.11.10", + "ga-gtag": "^1.2.0", + "gsap": "^3.12.5", "lodash-es": "^4.17.21", - "ofetch": "^1.0.1" + "ofetch": "^1.3.4" }, "devDependencies": { - "@antfu/eslint-config": "^2.6.4", - "@unocss/preset-wind": "^0.58.5", - "@unocss/transformer-directives": "^0.58.5", - "eslint": "^8.56.0", - "typescript": "^5.3.3", - "unocss": "^0.58.5", + "@antfu/eslint-config": "^2.14.0", + "@unocss/preset-wind": "^0.59.3", + "@unocss/transformer-directives": "^0.59.3", + "eslint": "^9.0.0", + "typescript": "^5.4.5", + "unocss": "^0.59.3", + "unplugin-auto-import": "^0.17.5", + "unplugin-vue-components": "^0.26.0", "vite-plugin-remove-console": "^2.2.0", - "vitepress": "1.0.0-rc.44", - "vitepress-sidebar": "^1.18.6" + "vitepress": "^1.1.0", + "vitepress-sidebar": "^1.22.0" } } diff --git a/src/components/HomeFeaturesBefore/index.vue b/src/components/HomeFeaturesBefore/index.vue index 49bc2743..a0c58432 100644 --- a/src/components/HomeFeaturesBefore/index.vue +++ b/src/components/HomeFeaturesBefore/index.vue @@ -1,6 +1,4 @@ @@ -28,7 +25,7 @@ const features = computed(() => { - {{ lang === "en" ? "What I've been doing lately" : "最近在做的事" }} + {{ lang === 'en' ? "What I've been doing lately" : '最近在做的事' }}
diff --git a/src/components/HomeHeroImage/index.vue b/src/components/HomeHeroImage/index.vue index 7f9f6fe5..32941407 100644 --- a/src/components/HomeHeroImage/index.vue +++ b/src/components/HomeHeroImage/index.vue @@ -1,8 +1,4 @@