Skip to content

Commit 31d00bf

Browse files
committed
chore: update lit & format
1 parent deada0a commit 31d00bf

File tree

53 files changed

+81
-65
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+81
-65
lines changed

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ lib/
88
_site/
99
dist/
1010
site/dist/
11-
components/version/version.tsx
11+
components/version/version.ts
1212
site/src/router/demoRoutes.js
13+
locale/

antd-tools/getWebpackConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ All rights reserved.
185185
};
186186

187187
if (process.env.RUN_ENV === 'PRODUCTION') {
188-
let entry = ['./index'];
188+
const entry = ['./index'];
189189
config.externals = [
190190
{
191191
vue: {

antd-tools/gulpfile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ function pub(done) {
368368
}
369369
}
370370

371-
let startTime = new Date();
371+
const startTime = new Date();
372372
gulp.task('compile-with-es', done => {
373373
console.log('start compile at ', startTime);
374374
console.log('[Parallel] Compile to es...');
@@ -452,7 +452,7 @@ gulp.task(
452452
newVersion.trim() === version
453453
) {
454454
// eslint-disable-next-line no-unused-vars
455-
runCmd('npm', ['run', 'pub'], code => {
455+
runCmd('npm', ['run', 'pub'], _code => {
456456
done();
457457
});
458458
} else {

components/_util/supportsPassive.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Test via a getter in the options object to see if the passive property is accessed
22
let supportsPassive = false;
33
try {
4-
let opts = Object.defineProperty({}, 'passive', {
4+
const opts = Object.defineProperty({}, 'passive', {
55
get() {
66
supportsPassive = true;
77
},

components/_util/type.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export interface PropOptions<T = any, D = T> {
3131
}
3232

3333
declare type VNodeChildAtom = VNode | string | number | boolean | null | undefined | void;
34+
35+
// eslint-disable-next-line no-undef
3436
export type VueNode = VNodeChildAtom | VNodeChildAtom[] | JSX.Element;
3537

3638
export const withInstall = <T>(comp: T) => {

components/breadcrumb/BreadcrumbItem.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import DownOutlined from '@ant-design/icons-vue/DownOutlined';
88
import useConfigInject from '../config-provider/hooks/useConfigInject';
99
import type { MouseEventHandler } from '../_util/EventInterface';
1010
import { eventType, objectType } from '../_util/type';
11-
import type { CustomSlotsType } from '../_util/type';
11+
import type { CustomSlotsType, VueNode } from '../_util/type';
1212

1313
export const breadcrumbItemProps = () => ({
1414
prefixCls: String,
@@ -38,7 +38,7 @@ export default defineComponent({
3838
* if overlay is have
3939
* Wrap a Dropdown
4040
*/
41-
const renderBreadcrumbNode = (breadcrumbItem: JSX.Element, prefixCls: string) => {
41+
const renderBreadcrumbNode = (breadcrumbItem: VueNode, prefixCls: string) => {
4242
const overlay = getPropsSlot(slots, props, 'overlay');
4343
if (overlay) {
4444
return (
@@ -59,7 +59,7 @@ export default defineComponent({
5959
const separator = getPropsSlot(slots, props, 'separator') ?? '/';
6060
const children = getPropsSlot(slots, props);
6161
const { class: cls, style, ...restAttrs } = attrs;
62-
let link: JSX.Element;
62+
let link: VueNode;
6363
if (props.href !== undefined) {
6464
link = (
6565
<a class={`${prefixCls.value}-link`} onClick={handleClick} {...restAttrs}>

components/locale-provider/__tests__/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ describe('Locale Provider', () => {
206206
return null;
207207
},
208208
};
209-
for (let locale of locales) {
209+
for (const locale of locales) {
210210
document.body.innerHTML = '';
211211
mount(
212212
{

components/message/__tests__/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ describe('message', () => {
107107

108108
// https:// github.com/ant-design/ant-design/issues/8201
109109
it('should hide message correctly', async () => {
110-
let hide = message.loading('Action in progress..', 0);
110+
const hide = message.loading('Action in progress..', 0);
111111
await Promise.resolve();
112112
expect(document.querySelectorAll('.ant-message-notice').length).toBe(1);
113113
hide();

components/modal/useModal/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ import destroyFns from '../destroyFns';
1212
let uuid = 0;
1313

1414
interface ElementsHolderRef {
15-
addModal: (modal: () => JSX.Element) => () => void;
15+
addModal: (modal: () => VueNode) => () => void;
1616
}
1717

1818
const ElementsHolder = defineComponent({
1919
name: 'ElementsHolder',
2020
inheritAttrs: false,
2121
setup(_, { expose }) {
22-
const modals = shallowRef<(() => JSX.Element)[]>([]);
23-
const addModal = (modal: () => JSX.Element) => {
22+
const modals = shallowRef<(() => VueNode)[]>([]);
23+
const addModal = (modal: () => VueNode) => {
2424
modals.value.push(modal);
2525
modals.value = modals.value.slice();
2626
return () => {

components/progress/Circle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const getMinPercent = (width: number): number => (CIRCLE_MIN_STROKE_WIDTH / widt
2323

2424
export default defineComponent({
2525
compatConfig: { MODE: 3 },
26-
name: 'Circle',
26+
name: 'ProgressCircle',
2727
inheritAttrs: false,
2828
props: initDefaultProps(circleProps(), {
2929
trailColor: null as unknown as string,

0 commit comments

Comments
 (0)