Skip to content

Commit 237cb45

Browse files
chore(deps): update lint (#10112)
* chore(deps): update lint * [autofix.ci] apply automated fixes --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent ab48377 commit 237cb45

File tree

5 files changed

+107
-102
lines changed

5 files changed

+107
-102
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@
7272
"@types/minimist": "^1.2.5",
7373
"@types/node": "^20.11.1",
7474
"@types/semver": "^7.5.6",
75-
"@typescript-eslint/eslint-plugin": "^6.17.0",
76-
"@typescript-eslint/parser": "^6.17.0",
75+
"@typescript-eslint/eslint-plugin": "^6.18.1",
76+
"@typescript-eslint/parser": "^6.18.1",
7777
"@vitest/coverage-istanbul": "^1.1.3",
7878
"@vue/consolidate": "0.17.3",
7979
"conventional-changelog-cli": "^4.1.0",
@@ -83,7 +83,7 @@
8383
"eslint": "^8.56.0",
8484
"eslint-define-config": "^1.24.1",
8585
"eslint-plugin-import": "npm:eslint-plugin-i@^2.29.1",
86-
"eslint-plugin-jest": "^27.6.1",
86+
"eslint-plugin-jest": "^27.6.3",
8787
"estree-walker": "^2.0.2",
8888
"execa": "^8.0.1",
8989
"jsdom": "^23.2.0",
@@ -95,7 +95,7 @@
9595
"minimist": "^1.2.8",
9696
"npm-run-all": "^4.1.5",
9797
"picocolors": "^1.0.0",
98-
"prettier": "^3.1.1",
98+
"prettier": "^3.2.2",
9999
"pretty-bytes": "^6.1.1",
100100
"pug": "^3.0.2",
101101
"puppeteer": "~21.7.0",

packages/reactivity/src/ref.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -501,11 +501,12 @@ export type ShallowUnwrapRef<T> = {
501501

502502
type DistrubuteRef<T> = T extends Ref<infer V> ? V : T
503503

504-
export type UnwrapRef<T> = T extends ShallowRef<infer V>
505-
? V
506-
: T extends Ref<infer V>
507-
? UnwrapRefSimple<V>
508-
: UnwrapRefSimple<T>
504+
export type UnwrapRef<T> =
505+
T extends ShallowRef<infer V>
506+
? V
507+
: T extends Ref<infer V>
508+
? UnwrapRefSimple<V>
509+
: UnwrapRefSimple<T>
509510

510511
export type UnwrapRefSimple<T> = T extends
511512
| Function

packages/runtime-core/src/componentEmits.ts

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,28 +54,30 @@ export type EmitsToProps<T extends EmitsOptions> = T extends string[]
5454
}
5555
: {}
5656

57-
export type ShortEmitsToObject<E> = E extends Record<string, any[]>
58-
? {
59-
[K in keyof E]: (...args: E[K]) => any
60-
}
61-
: E
57+
export type ShortEmitsToObject<E> =
58+
E extends Record<string, any[]>
59+
? {
60+
[K in keyof E]: (...args: E[K]) => any
61+
}
62+
: E
6263

6364
export type EmitFn<
6465
Options = ObjectEmitsOptions,
6566
Event extends keyof Options = keyof Options,
66-
> = Options extends Array<infer V>
67-
? (event: V, ...args: any[]) => void
68-
: {} extends Options // if the emit is empty object (usually the default value for emit) should be converted to function
69-
? (event: string, ...args: any[]) => void
70-
: UnionToIntersection<
71-
{
72-
[key in Event]: Options[key] extends (...args: infer Args) => any
73-
? (event: key, ...args: Args) => void
74-
: Options[key] extends any[]
75-
? (event: key, ...args: Options[key]) => void
76-
: (event: key, ...args: any[]) => void
77-
}[Event]
78-
>
67+
> =
68+
Options extends Array<infer V>
69+
? (event: V, ...args: any[]) => void
70+
: {} extends Options // if the emit is empty object (usually the default value for emit) should be converted to function
71+
? (event: string, ...args: any[]) => void
72+
: UnionToIntersection<
73+
{
74+
[key in Event]: Options[key] extends (...args: infer Args) => any
75+
? (event: key, ...args: Args) => void
76+
: Options[key] extends any[]
77+
? (event: key, ...args: Options[key]) => void
78+
: (event: key, ...args: any[]) => void
79+
}[Event]
80+
>
7981

8082
export function emit(
8183
instance: ComponentInternalInstance,

packages/runtime-core/src/componentPublicInstance.ts

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -84,34 +84,36 @@ type IsDefaultMixinComponent<T> = T extends ComponentOptionsMixin
8484
: false
8585
: false
8686

87-
type MixinToOptionTypes<T> = T extends ComponentOptionsBase<
88-
infer P,
89-
infer B,
90-
infer D,
91-
infer C,
92-
infer M,
93-
infer Mixin,
94-
infer Extends,
95-
any,
96-
any,
97-
infer Defaults,
98-
any,
99-
any,
100-
any
101-
>
102-
? OptionTypesType<P & {}, B & {}, D & {}, C & {}, M & {}, Defaults & {}> &
103-
IntersectionMixin<Mixin> &
104-
IntersectionMixin<Extends>
105-
: never
87+
type MixinToOptionTypes<T> =
88+
T extends ComponentOptionsBase<
89+
infer P,
90+
infer B,
91+
infer D,
92+
infer C,
93+
infer M,
94+
infer Mixin,
95+
infer Extends,
96+
any,
97+
any,
98+
infer Defaults,
99+
any,
100+
any,
101+
any
102+
>
103+
? OptionTypesType<P & {}, B & {}, D & {}, C & {}, M & {}, Defaults & {}> &
104+
IntersectionMixin<Mixin> &
105+
IntersectionMixin<Extends>
106+
: never
106107

107108
// ExtractMixin(map type) is used to resolve circularly references
108109
type ExtractMixin<T> = {
109110
Mixin: MixinToOptionTypes<T>
110111
}[T extends ComponentOptionsMixin ? 'Mixin' : never]
111112

112-
export type IntersectionMixin<T> = IsDefaultMixinComponent<T> extends true
113-
? OptionTypesType
114-
: UnionToIntersection<ExtractMixin<T>>
113+
export type IntersectionMixin<T> =
114+
IsDefaultMixinComponent<T> extends true
115+
? OptionTypesType
116+
: UnionToIntersection<ExtractMixin<T>>
115117

116118
export type UnwrapMixinsType<
117119
T,

0 commit comments

Comments
 (0)