Skip to content

Commit 9bc5241

Browse files
committed
chore: prettier all code
1 parent 9513334 commit 9bc5241

25 files changed

+170
-154
lines changed

.fatherrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ export default defineConfig({
77
output: 'es',
88
alias: { 'rc-util/lib': 'rc-util/es' },
99
},
10-
});
10+
});

LICENSE.md

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,8 @@ MIT LICENSE
22

33
Copyright (c) 2015-present Alipay.com, https://www.alipay.com/
44

5-
Permission is hereby granted, free of charge, to any person obtaining
6-
a copy of this software and associated documentation files (the
7-
"Software"), to deal in the Software without restriction, including
8-
without limitation the rights to use, copy, modify, merge, publish,
9-
distribute, sublicense, and/or sell copies of the Software, and to
10-
permit persons to whom the Software is furnished to do so, subject to
11-
the following conditions:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
126

13-
The above copyright notice and this permission notice shall be
14-
included in all copies or substantial portions of the Software.
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
158

16-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

docs/examples/basic.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import * as React from 'react';
33
import '../../assets/index.less';
44
import { defaultIcons } from './common';
55

6-
76
export default function Base() {
87
return (
98
<div>
@@ -21,7 +20,7 @@ export default function Base() {
2120
onVisibleChange: visible => {
2221
console.log('visible', visible);
2322
},
24-
zIndex: 9999
23+
zIndex: 9999,
2524
}}
2625
/>
2726

@@ -39,19 +38,19 @@ export default function Base() {
3938
style={{
4039
marginRight: 24,
4140
}}
42-
preview={{icons: defaultIcons}}
41+
preview={{ icons: defaultIcons }}
4342
/>
4443
<Image
4544
src="https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*NZuwQp_vcIQAAAAAAAAAAABkARQnAQ"
4645
width={200}
47-
preview={{icons: defaultIcons}}
46+
preview={{ icons: defaultIcons }}
4847
/>
4948

5049
<Image
5150
src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
5251
width={200}
5352
height={100}
54-
preview={{icons: defaultIcons}}
53+
preview={{ icons: defaultIcons }}
5554
/>
5655
</div>
5756
);

docs/examples/common.tsx

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
1-
2-
import React from 'react';
31
import type { PreviewProps } from '@/Preview';
42
import {
5-
CloseOutlined,
6-
LeftOutlined,
7-
RightOutlined,
8-
RotateLeftOutlined,
9-
RotateRightOutlined,
10-
SwapOutlined,
11-
ZoomInOutlined,
12-
ZoomOutOutlined,
13-
} from '@ant-design/icons';
14-
15-
export const defaultIcons: PreviewProps['icons'] = {
16-
rotateLeft: <RotateLeftOutlined />,
17-
rotateRight: <RotateRightOutlined />,
18-
zoomIn: <ZoomInOutlined />,
19-
zoomOut: <ZoomOutOutlined />,
20-
close: <CloseOutlined />,
21-
left: <LeftOutlined />,
22-
right: <RightOutlined />,
23-
flipX: <SwapOutlined />,
24-
flipY: <SwapOutlined rotate={90} />,
25-
};
3+
CloseOutlined,
4+
LeftOutlined,
5+
RightOutlined,
6+
RotateLeftOutlined,
7+
RotateRightOutlined,
8+
SwapOutlined,
9+
ZoomInOutlined,
10+
ZoomOutOutlined,
11+
} from '@ant-design/icons';
12+
import React from 'react';
13+
14+
export const defaultIcons: PreviewProps['icons'] = {
15+
rotateLeft: <RotateLeftOutlined />,
16+
rotateRight: <RotateRightOutlined />,
17+
zoomIn: <ZoomInOutlined />,
18+
zoomOut: <ZoomOutOutlined />,
19+
close: <CloseOutlined />,
20+
left: <LeftOutlined />,
21+
right: <RightOutlined />,
22+
flipX: <SwapOutlined />,
23+
flipY: <SwapOutlined rotate={90} />,
24+
};

docs/examples/controlled.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as React from 'react';
21
import Image from 'rc-image';
2+
import * as React from 'react';
33
import '../../assets/index.less';
44
import { defaultIcons } from './common';
55

docs/examples/controlledWithGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable global-require */
2-
import * as React from 'react';
32
import Image from 'rc-image';
3+
import * as React from 'react';
44
import '../../assets/index.less';
55
import { defaultIcons } from './common';
66

docs/examples/fallback.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as React from 'react';
21
import Image from 'rc-image';
2+
import * as React from 'react';
33
import '../../assets/index.less';
44
import { defaultIcons } from './common';
55

docs/examples/placeholder.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as React from 'react';
21
import Image from 'rc-image';
2+
import * as React from 'react';
33
import '../../assets/index.less';
44
import { defaultIcons } from './common';
55

@@ -22,7 +22,7 @@ export default function Base() {
2222
src={`${require('./images/placeholder.png')}?random=${random}`}
2323
width={400}
2424
placeholder
25-
preview={{icons: defaultIcons}}
25+
preview={{ icons: defaultIcons }}
2626
/>
2727
</div>
2828

@@ -32,7 +32,7 @@ export default function Base() {
3232
// eslint-disable-next-line global-require
3333
src={`${require('./images/placeholder.png')}?random=${random + 1}`}
3434
width={400}
35-
preview={{icons: defaultIcons}}
35+
preview={{ icons: defaultIcons }}
3636
placeholder={
3737
<Image
3838
width="100%"

docs/examples/thumbnail.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as React from 'react';
21
import Image from 'rc-image';
2+
import * as React from 'react';
33
import '../../assets/index.less';
44
import { defaultIcons } from './common';
55

@@ -17,7 +17,7 @@ export default function Thumbnail() {
1717

1818
<br />
1919
<h1>PreviewGroup</h1>
20-
<Image.PreviewGroup preview={{icons: defaultIcons}}>
20+
<Image.PreviewGroup preview={{ icons: defaultIcons }}>
2121
<Image
2222
key={1}
2323
src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png?x-oss-process=image/auto-orient,1/resize,p_10/quality,q_10"
@@ -30,8 +30,7 @@ export default function Thumbnail() {
3030
key={2}
3131
src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png?x-oss-process=image/auto-orient,1/resize,p_10/quality,q_10/contrast,-100"
3232
preview={{
33-
src:
34-
'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png?x-oss-process=image/auto-orient,1/contrast,-100',
33+
src: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png?x-oss-process=image/auto-orient,1/contrast,-100',
3534
}}
3635
width={200}
3736
/>

now.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,5 @@
88
"config": { "distDir": "dist" }
99
}
1010
],
11-
"routes": [
12-
{ "src": "/(.*)", "dest": "/dist/$1" }
13-
]
11+
"routes": [{ "src": "/(.*)", "dest": "/dist/$1" }]
1412
}

0 commit comments

Comments
 (0)