Skip to content

Commit f356aff

Browse files
committed
Fixing more linting.
1 parent 1f24f26 commit f356aff

File tree

3 files changed

+26
-20
lines changed

3 files changed

+26
-20
lines changed

src/CodeSnippetInputDialog.ts

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -241,15 +241,21 @@ class InputHandler extends Widget {
241241
getValue(): string[] {
242242
const inputs = [];
243243
inputs.push(
244-
(this.node.querySelector(
245-
`.${CODE_SNIPPET_DIALOG_NAME_INPUT}`
246-
) as HTMLInputElement).value,
247-
(this.node.querySelector(
248-
`.${CODE_SNIPPET_DIALOG_DESC_INPUT}`
249-
) as HTMLInputElement).value,
250-
(this.node.querySelector(
251-
`.${CODE_SNIPPET_DIALOG_LANG_INPUT}`
252-
) as HTMLInputElement).value
244+
(
245+
this.node.querySelector(
246+
`.${CODE_SNIPPET_DIALOG_NAME_INPUT}`
247+
) as HTMLInputElement
248+
).value,
249+
(
250+
this.node.querySelector(
251+
`.${CODE_SNIPPET_DIALOG_DESC_INPUT}`
252+
) as HTMLInputElement
253+
).value,
254+
(
255+
this.node.querySelector(
256+
`.${CODE_SNIPPET_DIALOG_LANG_INPUT}`
257+
) as HTMLInputElement
258+
).value
253259
);
254260

255261
inputs.push(...Private.selectedTags);

src/CodeSnippetPreview.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ export class Preview<T> extends Widget {
156156

157157
if (!this.editor && document.getElementById(PREVIEW_CONTENT + this._id)) {
158158
const editorFactory = this.editorServices.factoryService.newInlineEditor;
159-
const getMimeTypeByLanguage =
160-
this.editorServices.mimeTypeService.getMimeTypeByLanguage;
159+
const getMimeTypeByLanguage =
160+
this.editorServices.mimeTypeService.getMimeTypeByLanguage;
161161

162162
let previewFontSize = this.codeSnippetService.settings.get(
163163
'snippetPreviewFontSize'

src/CodeSnippetService.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class CodeSnippetService {
2929
if (
3030
!JSONExt.deepEqual(
3131
newCodeSnippetList,
32-
(this.codeSnippetList as unknown) as PartialJSONValue
32+
this.codeSnippetList as unknown as PartialJSONValue
3333
)
3434
) {
3535
this.codeSnippetList = this.convertToICodeSnippetList(
@@ -55,7 +55,7 @@ export class CodeSnippetService {
5555
if (this.settingManager.get('snippets').user === undefined) {
5656
// set the user setting + default in the beginning
5757
this.settingManager
58-
.set('snippets', (defaultSnippets as unknown) as PartialJSONValue)
58+
.set('snippets', defaultSnippets as unknown as PartialJSONValue)
5959
.then(() => {
6060
const userSnippets = this.convertToICodeSnippetList(
6161
this.settingManager.get('snippets').user as JSONArray
@@ -82,7 +82,7 @@ export class CodeSnippetService {
8282
const snippetList: ICodeSnippet[] = [];
8383

8484
snippets.forEach((snippet) => {
85-
snippetList.push((snippet as unknown) as ICodeSnippet);
85+
snippetList.push(snippet as unknown as ICodeSnippet);
8686
});
8787
return snippetList;
8888
}
@@ -124,7 +124,7 @@ export class CodeSnippetService {
124124
}
125125

126126
await this.settingManager
127-
.set('snippets', (this.codeSnippetList as unknown) as PartialJSONValue)
127+
.set('snippets', this.codeSnippetList as unknown as PartialJSONValue)
128128
.catch((_) => {
129129
return false;
130130
});
@@ -152,7 +152,7 @@ export class CodeSnippetService {
152152
}
153153

154154
await this.settingManager
155-
.set('snippets', (this.codeSnippetList as unknown) as PartialJSONValue)
155+
.set('snippets', this.codeSnippetList as unknown as PartialJSONValue)
156156
.catch((_) => {
157157
return false;
158158
});
@@ -168,7 +168,7 @@ export class CodeSnippetService {
168168
}
169169
}
170170
await this.settingManager
171-
.set('snippets', (this.codeSnippetList as unknown) as PartialJSONValue)
171+
.set('snippets', this.codeSnippetList as unknown as PartialJSONValue)
172172
.catch((_) => {
173173
return false;
174174
});
@@ -196,7 +196,7 @@ export class CodeSnippetService {
196196
}
197197

198198
await this.settingManager
199-
.set('snippets', (this.codeSnippetList as unknown) as PartialJSONValue)
199+
.set('snippets', this.codeSnippetList as unknown as PartialJSONValue)
200200
.catch((_) => {
201201
return false;
202202
});
@@ -228,7 +228,7 @@ export class CodeSnippetService {
228228
});
229229

230230
await this.settingManager
231-
.set('snippets', (this.codeSnippetList as unknown) as PartialJSONValue)
231+
.set('snippets', this.codeSnippetList as unknown as PartialJSONValue)
232232
.catch((_) => {
233233
return false;
234234
});
@@ -245,7 +245,7 @@ export class CodeSnippetService {
245245
this.codeSnippetList.forEach((snippet, i) => (snippet.id = i));
246246

247247
await this.settingManager
248-
.set('snippets', (this.codeSnippetList as unknown) as PartialJSONValue)
248+
.set('snippets', this.codeSnippetList as unknown as PartialJSONValue)
249249
.catch((_) => {
250250
return false;
251251
});

0 commit comments

Comments
 (0)