Skip to content

Commit 84b0a5e

Browse files
committed
style: Remove blank line
1 parent 4bc6498 commit 84b0a5e

7 files changed

Lines changed: 4 additions & 17 deletions

File tree

snapshot/all-in-one-js/Icon.jsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ Icon.defaultProps = {
9494
size: 14,
9595
};
9696

97-
/* eslint-disable */
98-
9997
/**
10098
* @param {string | string[] | undefined} color
10199
* @param {number} index
@@ -112,5 +110,4 @@ const getIconColor = (color, index, defaultColor) => {
112110
: defaultColor;
113111
};
114112

115-
116113
export default Icon;

snapshot/all-in-one-ts/Icon.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,6 @@ Icon.defaultProps = {
104104
size: 16,
105105
};
106106

107-
/* tslint:disable */
108-
/* eslint-disable */
109-
110107
const getIconColor = (color: string | string[] | undefined, index: number, defaultColor: string) => {
111108
return color
112109
? (
@@ -117,5 +114,4 @@ const getIconColor = (color: string | string[] | undefined, index: number, defau
117114
: defaultColor;
118115
};
119116

120-
121117
export default Icon;

snapshot/depends-on-js/Icon.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,4 @@ Icon.defaultProps = {
2727
size: 18,
2828
};
2929

30-
3130
export default Icon;

snapshot/depends-on-ts/Icon.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,4 @@ Icon.defaultProps = {
3737
size: 20,
3838
};
3939

40-
4140
export default Icon;

src/libs/replace.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ export const replaceToDependsComments = (content: string) => {
6464
export const replaceColorFunc = (content, extension: string) => {
6565
return content.replace(
6666
/#colorFunc#/,
67-
getTemplate(`helper${extension}`).replace(/export\s+/, '')
67+
getTemplate(`helper${extension}`)
68+
.replace(/export\s+/, '')
69+
.replace(/\/\*\s.+?\s\*\/\n/g, '')
6870
);
6971
};
7072

7173
export const replaceNoColor = (content) => {
72-
return content
73-
.replace(/#importColor#\n?/, '')
74-
.replace(/#colorFunc#\n?/, '');
74+
return content.replace(/#colorFunc#?/, '');
7575
};

src/templates/Icon.jsx.template

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,5 @@ const Icon = ({ color, name, size, ...rest }) => {
1616
Icon.defaultProps = {
1717
size: #size#,
1818
};
19-
2019
#colorFunc#
21-
2220
export default Icon;

src/templates/Icon.tsx.template

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,5 @@ const Icon: FunctionComponent<Props> = ({ color, name, size, ...rest }) => {
2626
Icon.defaultProps = {
2727
size: #size#,
2828
};
29-
3029
#colorFunc#
31-
3230
export default Icon;

0 commit comments

Comments
 (0)