mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-11-30 02:08:12 +08:00
ci: add lint to ci
This commit is contained in:
parent
df0e1de1b1
commit
bbbe50e6b8
2
.github/workflows/yarn.js.yml
vendored
2
.github/workflows/yarn.js.yml
vendored
@ -20,5 +20,7 @@ jobs:
|
||||
uses: actions/setup-node@v1
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
- name: Lint
|
||||
run: yarn lint
|
||||
- name: Test
|
||||
run: yarn test
|
||||
|
@ -5,7 +5,7 @@
|
||||
:src="src"
|
||||
:alt="alt"
|
||||
:srcset="srcSet"
|
||||
:style="fitStyle"
|
||||
:style="{objectFit: fit}"
|
||||
@error="handleError"
|
||||
>
|
||||
<i v-else-if="icon" :class="icon"></i>
|
||||
@ -83,7 +83,6 @@ export default defineComponent({
|
||||
}
|
||||
return {
|
||||
hasLoadError, avatarClass, sizeStyle, handleError,
|
||||
fitStyle,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
@ -13,8 +13,8 @@
|
||||
import { defineComponent, provide, ref, onMounted } from 'vue'
|
||||
|
||||
interface IBreadcrumbProps {
|
||||
separator: string;
|
||||
separatorClass: string;
|
||||
separator: string
|
||||
separatorClass: string
|
||||
}
|
||||
|
||||
export default defineComponent({
|
||||
|
@ -17,13 +17,13 @@ import { defineComponent, inject, ref, onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
interface IBreadcrumbInject {
|
||||
separator: string;
|
||||
separatorClass: string;
|
||||
separator: string
|
||||
separatorClass: string
|
||||
}
|
||||
|
||||
interface IBreadcrumbItemProps {
|
||||
to: string | Record<string, unknown>;
|
||||
replace: boolean;
|
||||
to: string | Record<string, unknown>
|
||||
replace: boolean
|
||||
}
|
||||
|
||||
export default defineComponent({
|
||||
|
@ -1,16 +1,16 @@
|
||||
type OptionalKeys<T extends object> = {
|
||||
type OptionalKeys<T extends Record<string, unknown>> = {
|
||||
[K in keyof T]: T extends Record<K, T[K]>
|
||||
? never
|
||||
: K
|
||||
}[keyof T]
|
||||
|
||||
type RequiredKeys<T extends object> = Exclude<keyof T, OptionalKeys<T>>
|
||||
type RequiredKeys<T extends Record<string, unknown>> = Exclude<keyof T, OptionalKeys<T>>
|
||||
|
||||
type MonoArgEmitter<T, Keys extends keyof T> = <K extends Keys>(evt: K, arg?: T[K]) => void
|
||||
|
||||
type BiArgEmitter<T, Keys extends keyof T> = <K extends Keys>(evt: K, arg: T[K]) => void
|
||||
|
||||
export type EventEmitter<T extends object> =
|
||||
export type EventEmitter<T extends Record<string, unknown>> =
|
||||
MonoArgEmitter<T, OptionalKeys<T>> & BiArgEmitter<T, RequiredKeys<T>>
|
||||
|
||||
type A = Required<{}>
|
||||
type A = Required<Record<string, unknown>>
|
||||
|
Loading…
Reference in New Issue
Block a user