Skip to content

Commit ed27700

Browse files
committed
style: lint code
1 parent eedd7f3 commit ed27700

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

components/_util/cssinjs/hooks/useCacheToken.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const isPrerender = process.env.NODE_ENV === 'prerender';
1414

1515
// Generate different prefix to make user selector break in production env.
1616
// This helps developer not to do style override directly on the hash id.
17-
const hashPrefix = (!isProduction && !isPrerender) ? 'css-dev-only-do-not-override' : 'css';
17+
const hashPrefix = !isProduction && !isPrerender ? 'css-dev-only-do-not-override' : 'css';
1818

1919
export interface Option<DerivativeToken, DesignToken> {
2020
/**

components/_util/hooks/_vueuse/_configurable.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface ConfigurableLocation {
2828
location?: Location;
2929
}
3030

31-
export const defaultWindow = isClient ? window : undefined;
32-
export const defaultDocument = isClient ? window.document : undefined;
33-
export const defaultNavigator = isClient ? window.navigator : undefined;
34-
export const defaultLocation = isClient ? window.location : undefined;
31+
export const defaultWindow = isClient ? window : undefined;
32+
export const defaultDocument = isClient ? window.document : undefined;
33+
export const defaultNavigator = isClient ? window.navigator : undefined;
34+
export const defaultLocation = isClient ? window.location : undefined;

components/_util/hooks/_vueuse/is.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ export const rand = (min: number, max: number) => {
2121
return Math.floor(Math.random() * (max - min + 1)) + min;
2222
};
2323
export const isIOS =
24-
isClient &&
25-
window?.navigator?.userAgent &&
26-
/iP(ad|hone|od)/.test(window.navigator.userAgent);
24+
isClient && window?.navigator?.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);
2725
export const hasOwn = <T extends object, K extends keyof T>(val: T, key: K): key is K =>
2826
Object.prototype.hasOwnProperty.call(val, key);

components/tooltip/demo/arrow.vue

+1
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ const mergedArrow = computed(() => {
128128
case 'hide':
129129
return false;
130130
case 'center':
131+
default:
131132
return { pointAtCenter: true };
132133
}
133134
});

components/vc-select/TransBtn.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { cloneVNode, type FunctionalComponent, type PropType } from 'vue';
1+
import { cloneVNode } from 'vue';
2+
import type { VNode, FunctionalComponent, PropType } from 'vue';
23
import type { MouseEventHandler } from '../_util/EventInterface';
34
import type { VueNode } from '../_util/type';
45
import PropTypes from '../_util/vue-types';
@@ -23,7 +24,7 @@ const TransBtn: TransBtnType = (props, { slots }) => {
2324
if (typeof customizeIcon === 'function') {
2425
icon = customizeIcon(customizeIconProps);
2526
} else {
26-
icon = cloneVNode(customizeIcon);
27+
icon = cloneVNode(customizeIcon as VNode);
2728
}
2829

2930
return (

0 commit comments

Comments
 (0)