Skip to content

Commit 49f1ab4

Browse files
committed
fix linter issues
1 parent 6be8db3 commit 49f1ab4

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/languageservice/services/yamlHover.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export class YAMLHover {
141141
if (s.schema.anyOf && isAllSchemasMatched(node, matchingSchemas, s.schema)) {
142142
//if append title and description of all matched schemas on hover
143143
title = '';
144-
markdownDescription = s.schema.description ? (s.schema.description + '\n') : '';
144+
markdownDescription = s.schema.description ? s.schema.description + '\n' : '';
145145
s.schema.anyOf.forEach((childSchema: JSONSchema, index: number) => {
146146
title += childSchema.title || s.schema.closestTitle || '';
147147
markdownDescription += childSchema.markdownDescription || this.toMarkdown(childSchema.description) || '';

test/hover.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -772,16 +772,16 @@ Source: [${SCHEMA_ID}](file:///${SCHEMA_ID})`
772772
properties: {
773773
optionalZipFile: {
774774
title: 'ZIP file',
775-
anyOf: [{ type: "string", pattern: "\\.zip$" }, { type: "null" }],
775+
anyOf: [{ type: 'string', pattern: '\\.zip$' }, { type: 'null' }],
776776
default: null,
777-
description: "Optional ZIP file path.",
777+
description: 'Optional ZIP file path.',
778778
},
779779
},
780780
required: ['optionalZipFile'],
781781
additionalProperties: false,
782782
});
783-
let content = 'optionalZipF|i|le:';
784-
let result = await parseSetup(content);
783+
const content = 'optionalZipF|i|le:';
784+
const result = await parseSetup(content);
785785

786786
assert.strictEqual(MarkupContent.is(result.contents), true);
787787
assert.strictEqual(
@@ -806,7 +806,7 @@ Source: [${SCHEMA_ID}](file:///${SCHEMA_ID})`
806806
$ref: '#/definitions/SecondChoice',
807807
},
808808
],
809-
description: "The parent description."
809+
description: 'The parent description.',
810810
},
811811
},
812812
required: ['child'],
@@ -851,15 +851,15 @@ Source: [${SCHEMA_ID}](file:///${SCHEMA_ID})`
851851
},
852852
});
853853

854-
let content = 'ch|i|ld:';
855-
let result = await parseSetup(content);
854+
const content = 'ch|i|ld:';
855+
const result = await parseSetup(content);
856856
assert.strictEqual(MarkupContent.is(result.contents), true);
857857
assert.strictEqual(
858858
(result.contents as MarkupContent).value,
859859
`#### FirstChoice || SecondChoice\n\nThe parent description.\nThe first choice || The second choice\n\nSource: [${SCHEMA_ID}](file:///${SCHEMA_ID})`
860860
);
861861
expect(telemetry.messages).to.be.empty;
862-
})
862+
});
863863
});
864864

865865
describe('Bug fixes', () => {

0 commit comments

Comments
 (0)