Skip to content

Commit a997575

Browse files
renovate[bot]cexbrayat
authored andcommitted
chore(deps): update typescript-eslint monorepo to v8
Fixes or ignores some new lint errors caught by typescript-eslint v8
1 parent 9d0a618 commit a997575

8 files changed

+77
-69
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
"@rollup/plugin-typescript": "11.1.6",
3535
"@types/js-beautify": "1.14.3",
3636
"@types/node": "20.14.13",
37-
"@typescript-eslint/eslint-plugin": "7.18.0",
38-
"@typescript-eslint/parser": "7.18.0",
37+
"@typescript-eslint/eslint-plugin": "8.0.0",
38+
"@typescript-eslint/parser": "8.0.0",
3939
"@vitejs/plugin-vue": "5.1.1",
4040
"@vitejs/plugin-vue-jsx": "4.0.0",
4141
"@vitest/coverage-v8": "2.0.5",

pnpm-lock.yaml

+60-61
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/createDomEvent.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import domEvents, {
1111
} from './constants/dom-events'
1212

1313
interface TriggerOptions {
14-
code?: String
15-
key?: String
16-
keyCode?: Number
14+
code?: string
15+
key?: string
16+
keyCode?: number
1717
[custom: string]: any
1818
}
1919

@@ -156,7 +156,7 @@ function createDOMEvent(
156156
const eventPrototype = Object.getPrototypeOf(event)
157157

158158
// attach custom options to the event, like `relatedTarget` and so on.
159-
options &&
159+
if (options) {
160160
Object.keys(options).forEach((key) => {
161161
const propertyDescriptor = Object.getOwnPropertyDescriptor(
162162
eventPrototype,
@@ -169,6 +169,7 @@ function createDOMEvent(
169169
event[key] = options[key]
170170
}
171171
})
172+
}
172173
return event
173174
}
174175

src/createInstance.ts

+3
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ function getInstanceOptions(
6868

6969
// implementation
7070
export function createInstance(
71+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
7172
inputComponent: DefineComponent<{}, {}, any, any, any, any>,
7273
options?: MountingOptions<any> & Record<string, any>
7374
) {
@@ -129,8 +130,10 @@ export function createInstance(
129130
options?.slots &&
130131
Object.entries(options.slots).reduce(
131132
(
133+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
132134
acc: { [key: string]: Function },
133135
[name, slot]: [string, Slot]
136+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
134137
): { [key: string]: Function } => {
135138
if (Array.isArray(slot)) {
136139
const normalized = slot.map(slotToFunction)

src/mount.ts

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ type ShimSlotReturnType<T> = T extends (...args: infer P) => any
1616

1717
type WithArray<T> = T | T[]
1818

19+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
1920
type ComponentData<T> = T extends { data?(...args: any): infer D } ? D : {}
2021

2122
export type ComponentMountingOptions<

src/types.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-empty-object-type */
12
import {
23
Component,
34
ComponentOptions,
@@ -27,6 +28,7 @@ export type FindAllComponentsSelector =
2728
| string
2829
export type FindComponentSelector = RefSelector | FindAllComponentsSelector
2930

31+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
3032
export type Slot = VNode | string | { render: Function } | Function | Component
3133

3234
type SlotDictionary = {

src/utils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,14 @@ export function textContent(element: Node): string {
157157
: ''
158158
}
159159

160-
export function hasOwnProperty<O extends {}, P extends PropertyKey>(
160+
export function hasOwnProperty<O extends object, P extends PropertyKey>(
161161
obj: O,
162162
prop: P
163163
): obj is O & Record<P, unknown> {
164164
return obj.hasOwnProperty(prop)
165165
}
166166

167-
export function isNotNullOrUndefined<T extends {}>(
167+
export function isNotNullOrUndefined<T extends object>(
168168
obj: T | null | undefined
169169
): obj is T {
170170
return Boolean(obj)

src/utils/vueCompatSupport.ts

+2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ function isCompatEnabled(key: string): boolean {
77
}
88

99
export function isLegacyExtendedComponent(component: unknown): component is {
10+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
1011
(): Function
12+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
1113
super: Function
1214
options: ComponentOptions
1315
} {

0 commit comments

Comments
 (0)