Skip to content

Commit b737803

Browse files
chore: update linting
1 parent 27d165e commit b737803

File tree

12 files changed

+24
-24
lines changed

12 files changed

+24
-24
lines changed

src/extension/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { ParentPort } from '../types'
22
import { Unport } from 'unport'
33
import { workspace } from 'vscode'
4-
import { type ChildProcessWithoutNullStreams } from 'node:child_process'
4+
import type { ChildProcessWithoutNullStreams } from 'node:child_process'
55

66
export function resolveBinary() {
77
return workspace.getConfiguration('astGrep').get('serverPath', 'ast-grep')

src/extension/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ExtensionContext } from 'vscode'
1+
import type { ExtensionContext } from 'vscode'
22
import { activatePreview } from './preview'
33
import { activateWebview } from './webview'
44
import { activateLsp } from './lsp'

src/extension/lsp.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { workspace, ExtensionContext, window, commands } from 'vscode'
1+
import { workspace, type ExtensionContext, window, commands } from 'vscode'
22
import {
33
LanguageClient,
4-
LanguageClientOptions,
5-
ServerOptions,
6-
Executable,
4+
type LanguageClientOptions,
5+
type ServerOptions,
6+
type Executable,
77
} from 'vscode-languageclient/node'
88
import { resolveBinary } from './common'
99

src/extension/preview.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
// See relevant comments for TextDocumentContentProvider
66
// custom scheme comes from https://stackoverflow.com/a/69384899/2198656
77
import {
8-
CancellationToken,
9-
ExtensionContext,
8+
type CancellationToken,
9+
type ExtensionContext,
1010
Position,
1111
Range,
12-
TextDocument,
13-
TextDocumentContentProvider,
12+
type TextDocument,
13+
type TextDocumentContentProvider,
1414
Uri,
1515
commands,
1616
window,
@@ -28,7 +28,7 @@ import type {
2828
} from '../types'
2929
import { parentPort, streamedPromise } from './common'
3030
import { buildCommand, splitByHighLightToken } from './search'
31-
import path from 'path'
31+
import path from 'node:path'
3232

3333
const SCHEME = 'sgpreview'
3434
let lastPattern = ''

src/extension/search.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import path from 'path'
2-
import { ExtensionContext, commands, workspace, window } from 'vscode'
1+
import path from 'node:path'
2+
import { type ExtensionContext, commands, workspace, window } from 'vscode'
33
import { type ChildProcessWithoutNullStreams, spawn } from 'node:child_process'
44

55
import { parentPort, resolveBinary, streamedPromise } from './common'

src/test/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as vscode from 'vscode'
2-
import * as path from 'path'
3-
import * as assert from 'assert'
2+
import * as path from 'node:path'
3+
import * as assert from 'node:assert'
44

55
export let doc: vscode.TextDocument
66
export let editor: vscode.TextEditor

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Unport } from 'unport'
1+
import type { Unport } from 'unport'
22

33
type WithId<T> = T & { id: number }
44

src/webview/SearchSidebar/SearchProviderMessage/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { memo } from 'react'
22
import { VSCodeLink } from '@vscode/webview-ui-toolkit/react'
3-
import { DisplayResult, SearchQuery } from '../../../types'
3+
import type { DisplayResult, SearchQuery } from '../../../types'
44

55
const style = {
66
color: 'var(--vscode-search-resultsInfoForeground)',

src/webview/SearchSidebar/SearchResultList/Actions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { MouseEvent, useCallback } from 'react'
1+
import { type MouseEvent, useCallback } from 'react'
22
import type { DisplayResult } from '../../../types'
33
import {
44
acceptChangeAndRefresh,

src/webview/SearchSidebar/SearchResultList/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { memo, useCallback } from 'react'
2-
import { DisplayResult } from '../../../types'
2+
import type { DisplayResult } from '../../../types'
33
import TreeItem from './TreeItem'
44
import * as stylex from '@stylexjs/stylex'
55
import { Virtuoso } from 'react-virtuoso'

0 commit comments

Comments
 (0)