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
|
uses: actions/setup-node@v1
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn install --frozen-lockfile
|
run: yarn install --frozen-lockfile
|
||||||
|
- name: Lint
|
||||||
|
run: yarn lint
|
||||||
- name: Test
|
- name: Test
|
||||||
run: yarn test
|
run: yarn test
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
:src="src"
|
:src="src"
|
||||||
:alt="alt"
|
:alt="alt"
|
||||||
:srcset="srcSet"
|
:srcset="srcSet"
|
||||||
:style="fitStyle"
|
:style="{objectFit: fit}"
|
||||||
@error="handleError"
|
@error="handleError"
|
||||||
>
|
>
|
||||||
<i v-else-if="icon" :class="icon"></i>
|
<i v-else-if="icon" :class="icon"></i>
|
||||||
@ -83,7 +83,6 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
hasLoadError, avatarClass, sizeStyle, handleError,
|
hasLoadError, avatarClass, sizeStyle, handleError,
|
||||||
fitStyle,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
import { defineComponent, provide, ref, onMounted } from 'vue'
|
import { defineComponent, provide, ref, onMounted } from 'vue'
|
||||||
|
|
||||||
interface IBreadcrumbProps {
|
interface IBreadcrumbProps {
|
||||||
separator: string;
|
separator: string
|
||||||
separatorClass: string;
|
separatorClass: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
@ -17,13 +17,13 @@ import { defineComponent, inject, ref, onMounted } from 'vue'
|
|||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
|
||||||
interface IBreadcrumbInject {
|
interface IBreadcrumbInject {
|
||||||
separator: string;
|
separator: string
|
||||||
separatorClass: string;
|
separatorClass: string
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IBreadcrumbItemProps {
|
interface IBreadcrumbItemProps {
|
||||||
to: string | Record<string, unknown>;
|
to: string | Record<string, unknown>
|
||||||
replace: boolean;
|
replace: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export default defineComponent({
|
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]>
|
[K in keyof T]: T extends Record<K, T[K]>
|
||||||
? never
|
? never
|
||||||
: K
|
: K
|
||||||
}[keyof T]
|
}[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 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
|
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>>
|
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