8000 feat: apply lint, use explict import · nuxt/devtools@2c6d2d3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2c6d2d3

Browse files
committed
feat: apply lint, use explict import
1 parent da4e176 commit 2c6d2d3

29 files changed

+511
-188
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { defineAppConfig } from '#imports'
2+
13
export default defineAppConfig({
24
fixture1: 'from app.config.ts',
35
})

packages/devtools/client/composables/client-services/markdown.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type MarkdownIt from 'markdown-it'
2+
import { shallowRef } from 'vue'
23

34
const md = shallowRef<MarkdownIt>()
45

packages/devtools/client/composables/client-services/shiki.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { BuiltinLanguage, HighlighterCore } from 'shiki'
22
import { createHighlighterCore, createJavaScriptRegexEngine } from 'shiki/core'
3+
import { shallowRef } from 'vue'
34

45
export const shiki = shallowRef<HighlighterCore>()
56

packages/devtools/client/composables/client.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
import type { useRoute, useRouter } from '#imports'
12
import type { NuxtDevtoolsClient, NuxtDevtoolsHostClient, NuxtDevtoolsIframeClient, VueInspectorData } from '@nuxt/devtools-kit/types'
23
import type { Unhead } from '@unhead/schema'
4+
import type { ComputedRef } from 'vue'
5+
import { useState } from '#imports'
6+
import { useColorMode } from '@vueuse/core'
7+
import { computed, ref } from 'vue'
38
import { renderMarkdown } from './client-services/markdown'
49
import { renderCodeHighlight } from './client-services/shiki'
510
import { extendedRpcMap, rpc } from './rpc'

packages/devtools/client/composables/dev-auth.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
import { devtoolsUiShowNotification } from '#imports'
12
import { until } from '@vueuse/core'
23
import { UAParser } from 'ua-parser-js'
4+
import { ref } from 'vue'
5+
import { AuthConfirm } from './dialog'
6+
import { rpc } from './rpc'
37

48
export const devAuthToken = ref<string | null>(localStorage.getItem('__nuxt_dev_token__'))
59

packages/devtools/client/composables/dialog.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import type { InstallModuleReturn, ModuleActionType, ModuleStaticInfo } from '../../src/types'
2+
import { useState } from '#imports'
3+
import { createTemplatePromise } from '@vueuse/core'
24

35
export const ModuleDialog = createTemplatePromise<boolean, [info: ModuleStaticInfo, result: InstallModuleReturn, type: ModuleActionType]>()
46

packages/devtools/client/composables/editor.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1+
import { useRouter } from '#app/composables/router'
2+
import { devtoolsUiShowNotification } from '#imports'
13
import { useClipboard } from '@vueuse/core'
4+
import { rpc } from './rpc'
5+
import { useServerConfig, useVirtualFiles } from './state'
6+
import { useCurrentVirtualFile } from './state-routes'
7+
import { telemetry } from './telemetry'
28

39
export function useOpenInEditor() {
410
const config = useServerConfig()

packages/devtools/client/composables/npm.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import type { NpmCommandOptions } from '../../src/types'
2+
import { useNuxtApp } from '#app/nuxt'
23
import semver from 'semver'
4+
import { computed, ref } from 'vue'
5+
import { ensureDevAuthToken } from './dev-auth'
6+
import { rpc } from './rpc'
7+
import { useAsyncState } from './utils'
38

49
export type PackageUpdateState = 'idle' | 'running' | 'updated'
510

packages/devtools/client/composables/rpc.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import type { ClientFunctions, ServerFunctions } from '../../src/types'
2+
import { useDebounce } from '@vueuse/core'
23
import { createBirpc } from 'birpc'
34
import { parse, stringify } from 'flatted'
45
import { tryCreateHotContext } from 'vite-hot-client'
6+
import { ref } from 'vue'
57
import { WS_EVENT_NAME } from '../../src/constant'
68

79
export const wsConnecting = ref(false)

packages/devtools/client/composables/state-commands.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import type { MaybeRefOrGetter } from 'vue'
2+
import { useRouter } from '#app/composables/router'
23
import { randomStr } from '@antfu/utils'
4+
import { computed, onUnmounted, reactive, toValue } from 'vue'
5+
import { useEnabledTabs } from './state-tabs'
36

47
export interface CommandItem {
58
id: string

0 commit comments

Comments
 (0)
0