Skip to content

Commit 009966d

Browse files
committed
chore: lint fix
1 parent c3e770f commit 009966d

16 files changed

Lines changed: 19 additions & 19 deletions

packages/win32-api/demo/EnumDisplayDevicesW.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ try {
3636

3737
console.info({ res, DeviceID, DeviceKey, DeviceName, DeviceString })
3838

39-
assert(DeviceID.startsWith('PCI\\VEN_') || DeviceID.includes('VMBUS') || DeviceID === '', DeviceID)
39+
assert(DeviceID.startsWith(String.raw`PCI\VEN_`) || DeviceID.includes('VMBUS') || DeviceID === '', DeviceID)
4040
assert(typeof DeviceKey === 'string', DeviceKey)
41-
assert(DeviceName === '\\\\.\\DISPLAY1', DeviceName)
41+
assert(DeviceName === String.raw`\\.\DISPLAY1`, DeviceName)
4242
assert(DeviceString.length > 0)
4343
const flag = ['Microsoft Hyper-V', 'Intel', 'AMD', 'Radeon'].some(val => DeviceString.includes(val))
4444
assert(flag, DeviceString)

packages/win32-api/demo/create_window.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* @author waiting
1212
* @link https://github.com/waitingsong/node-win32-api
1313
*/
14-
import assert from 'assert'
14+
import assert from 'node:assert'
1515

1616
import { sleep } from '@waiting/shared-core'
1717
import { ffi, User32, Kernel32 } from 'win32-api'

packages/win32-api/src/lib/user32/mapper/GetClassInfoExW.mapper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import assert from 'assert'
1+
import assert from 'node:assert'
22

33
import type { FlattenNestedTuple } from '@waiting/shared-types'
44
import { WString } from 'win32-def/def'

packages/win32-api/src/lib/winspool/mapper/GetPrinterW.mapper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import assert from 'assert'
1+
import assert from 'node:assert'
22

33
import type { FlattenNestedTuple } from '@waiting/shared-types'
44
import { getPRINTER_INFO_X_Ptr } from 'win32-def/struct'

packages/win32-api/src/util/user32/FindWindowEx.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import assert from 'assert'
1+
import assert from 'node:assert'
22

33
import { load } from '##/lib/user32/index.js'
44
import type { LibUser32 } from '##/lib/user32/index.js'

packages/win32-api/src/util/user32/GetWindowText.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import assert from 'assert'
1+
import assert from 'node:assert'
22

33
import { ucsBufferToString } from 'win32-def'
44

packages/win32-api/src/util/user32/MessageBox.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* c8 ignore start */
2-
import assert from 'assert'
2+
import assert from 'node:assert'
33

44
import { load } from '##/lib/user32/index.js'
55
import type { LibUser32 } from '##/lib/user32/index.js'

packages/win32-def/demo/EnumDisplayDevicesW.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ try {
2929

3030
console.info({ res, DeviceID, DeviceKey, DeviceName, DeviceString })
3131

32-
assert(DeviceID.startsWith('PCI\\VEN_') || DeviceID.includes('VMBUS') || DeviceID === '', DeviceID)
32+
assert(DeviceID.startsWith(String.raw`PCI\VEN_`) || DeviceID.includes('VMBUS') || DeviceID === '', DeviceID)
3333
assert(typeof DeviceKey === 'string', DeviceKey)
34-
assert(DeviceName === '\\\\.\\DISPLAY1', DeviceName)
34+
assert(DeviceName === String.raw`\\.\DISPLAY1`, DeviceName)
3535
assert(DeviceString.length > 0)
3636
const flag = ['Microsoft Hyper-V', 'Intel', 'AMD', 'Radeon'].some(val => DeviceString.includes(val))
3737
assert(flag, DeviceString)

packages/win32-def/src/lib/loader/loader.cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class LoaderCache {
5151
const cacheMap = LoaderCache.regCacheMap.get(lib)
5252
const map = cacheMap?.get(fnName)
5353
if (map?.size) {
54-
const arr = map.entries().next().value as [FnDefArgs, KoffiFunction] | undefined
54+
const arr = map.entries().next().value
5555
const ret = arr?.[1]
5656
return ret
5757
}

packages/win32-def/src/lib/struct/struct.helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import assert from 'assert'
1+
import assert from 'node:assert'
22

33
import ffi from 'koffi'
44
import type { IKoffiCType } from 'koffi'

0 commit comments

Comments
 (0)