Skip to content

Commit eb87d44

Browse files
committed
linter warnings fixed
1 parent bbf0951 commit eb87d44

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

src/lib/output/themes/default/partials/member.declaration.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,33 @@ export function memberDeclaration(context: DefaultThemeRenderContext, props: Dec
2828
}
2929

3030
const visitor = { reflection: renderTypeDeclaration };
31-
32-
/** Fix for #2717. If type is the same as value the type is omited */
33-
function shouldRenderType(){
34-
if(props.type && props.type.type === "literal"){
31+
32+
/** Fix for #2717. If type is the same as value the type is omited */
33+
function shouldRenderType() {
34+
if (props.type && props.type.type === "literal") {
3535
const typeObject = props.type.toObject();
3636
const value = typeObject.value;
37-
if(!value) { // should be unreachable
37+
if (!value) {
38+
// should be unreachable
3839
return true;
3940
}
40-
if(typeof value === "object") {
41+
if (typeof value === "object") {
4142
return true;
4243
}
4344
const reflectionTypeString: string = value.toString();
4445
let defaultValue = props.defaultValue!;
45-
if(defaultValue){
46+
if (defaultValue) {
4647
// If the default value is string and it's wrapped in ' in the code, the value is wrapped in " and vice-versa
47-
if( (defaultValue[0] === '"' && defaultValue[defaultValue.length - 1] === '"') ||
48+
if (
49+
(defaultValue[0] === '"' && defaultValue[defaultValue.length - 1] === '"') ||
4850
(defaultValue[0] === "'" && defaultValue[defaultValue.length - 1] === "'")
4951
) {
5052
defaultValue = defaultValue.slice(1, -1);
5153
}
5254
}
53-
54-
if( reflectionTypeString === defaultValue.toString() ) {
55-
return false;
55+
56+
if (reflectionTypeString === defaultValue.toString()) {
57+
return false;
5658
}
5759
return true;
5860
}

0 commit comments

Comments
 (0)