Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Sep 4, 2024
1 parent 42027e9 commit 836ff6e
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 19 deletions.
1 change: 1 addition & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- eslint-disable no-useless-escape -->
<script setup lang="ts">
import { Repl } from '@vue/repl'
import Monaco from '@vue/repl/monaco-editor'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
getSupportedTSVersions,
getSupportedVueVersions,
} from '@/utils/dependency'
import type { Ref } from 'vue'
import type { Store, VersionKey } from '@/composables/store'
import type { Ref } from 'vue'
const appVersion = import.meta.env.APP_VERSION
const replVersion = import.meta.env.REPL_VERSION
Expand Down
12 changes: 6 additions & 6 deletions src/composables/store.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import {
File,
type ImportMap,
type StoreState,
compileFile,
File,
mergeImportMap,
useStore as useReplStore,
type ImportMap,
type StoreState,
} from '@vue/repl'
import { objectOmit } from '@vueuse/core'
import { atou, utoa } from '@/utils/encode'
import { IS_DEV } from '@/constants'
import {
genCdnLink,
genCompilerSfcLink,
genImportMap,
} from '@/utils/dependency'
import { IS_DEV } from '@/constants'
import { atou, utoa } from '@/utils/encode'
import elementPlusCode from '../template/element-plus.js?raw'
import mainCode from '../template/main.vue?raw'
import welcomeCode from '../template/welcome.vue?raw'
import tsconfigCode from '../template/tsconfig.json?raw'
import welcomeCode from '../template/welcome.vue?raw'

export interface Initial {
serializedState?: string
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { createApp } from 'vue'
import App from '@/App.vue'
import '@unocss/reset/tailwind.css'
import '@vue/repl/style.css'
import 'element-plus/theme-chalk/dark/css-vars.css'
import 'uno.css'
import App from '@/App.vue'

// @ts-expect-error Custom window property
window.VUE_DEVTOOLS_CONFIG = {
Expand Down
2 changes: 1 addition & 1 deletion src/template/element-plus.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getCurrentInstance } from 'vue'
import ElementPlus from 'element-plus'
import { getCurrentInstance } from 'vue'

let installed = false
await loadStyle()
Expand Down
4 changes: 2 additions & 2 deletions src/template/welcome.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { ref, version as vueVersion } from 'vue'
import { version as epVersion } from 'element-plus'
import { ElementPlus } from '@element-plus/icons-vue'
import { version as epVersion } from 'element-plus'
import { ref, version as vueVersion } from 'vue'
const msg = ref('Hello World!')
</script>
Expand Down
4 changes: 2 additions & 2 deletions src/utils/dependency.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { gte } from 'semver'
import type { Ref } from 'vue'
import type { MaybeRef } from '@vueuse/core'
import type { Versions } from '@/composables/store'
import type { ImportMap } from '@vue/repl'
import type { MaybeRef } from '@vueuse/core'
import type { Ref } from 'vue'

export interface Dependency {
pkg?: string
Expand Down
2 changes: 1 addition & 1 deletion unocss.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig, presetAttributify, presetIcons, presetUno } from 'unocss'
import transformerDirective from '@unocss/transformer-directives'
import { defineConfig, presetAttributify, presetIcons, presetUno } from 'unocss'

export default defineConfig({
presets: [presetUno(), presetAttributify(), presetIcons()],
Expand Down
10 changes: 5 additions & 5 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import fs from 'node:fs'
import path from 'node:path'
import { defineConfig } from 'vite'
import Unocss from 'unocss/vite'
import vue from '@vitejs/plugin-vue'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
import replPkg from '@vue/repl/package.json' assert { type: 'json' }
import Unocss from 'unocss/vite'
import AutoImport from 'unplugin-auto-import/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
import Components from 'unplugin-vue-components/vite'
import { defineConfig } from 'vite'
import Inspect from 'vite-plugin-inspect'
import Mkcert from 'vite-plugin-mkcert'
import replPkg from '@vue/repl/package.json' assert { type: 'json' }
import pkg from './package.json'

const pathSrc = path.resolve(__dirname, 'src')
Expand Down

0 comments on commit 836ff6e

Please sign in to comment.