Skip to content

Commit dd61b8a

Browse files
committed
chore: run eslint-fix
1 parent b741927 commit dd61b8a

8 files changed

+12
-12
lines changed

lib/adapters/command-execution-adapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default class CommandExecutionAdapter {
2929

3030
private static createExecuteCommandParams(command: string, commandArgs?: any[]): ExecuteCommandParams {
3131
return {
32-
command: command,
32+
command,
3333
arguments: commandArgs,
3434
}
3535
}

lib/auto-languageclient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ export default class AutoLanguageClient {
516516
public provideAutocomplete(): ac.AutocompleteProvider {
517517
return {
518518
selector: this.getGrammarScopes()
519-
.map((g) => (g.includes(".") ? "." + g : g))
519+
.map((g) => (g.includes(".") ? `.${g}` : g))
520520
.join(", "),
521521
inclusionPriority: 1,
522522
suggestionPriority: 2,

test/adapters/apply-edit-adapter.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const TEST_PATH4 = normalizeDriveLetterName(path.join(__dirname, "test4.txt"))
1212

1313
function normalizeDriveLetterName(filePath: string): string {
1414
if (process.platform === "win32") {
15-
return filePath.replace(/^([a-z]):/, ([driveLetter]) => driveLetter.toUpperCase() + ":")
15+
return filePath.replace(/^([a-z]):/, ([driveLetter]) => `${driveLetter.toUpperCase()}:`)
1616
} else {
1717
return filePath
1818
}

test/adapters/autocomplete-adapter.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ describe("AutoCompleteAdapter", () => {
277277
it("respects onDidConvertCompletionItem", async () => {
278278
sinon.stub(server.connection, "completion").resolves([createCompletionItem("label")])
279279
const results = await autoCompleteAdapter.getSuggestions(server, createRequest({}), (c, a, r) => {
280-
;(a as ac.TextSuggestion).text = c.label + " ok"
280+
;(a as ac.TextSuggestion).text = `${c.label} ok`
281281
a.displayText = r.scopeDescriptor.getScopesArray()[0]
282282
})
283283

test/adapters/code-action-adapter.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ describe("CodeActionAdapter", () => {
5757
expect((languageClient as any).codeAction.called).to.be.true
5858
const args = (languageClient as any).codeAction.getCalls()[0].args
5959
const params: ls.CodeActionParams = args[0]
60-
expect(params.textDocument.uri).to.equal("file://" + testPath)
60+
expect(params.textDocument.uri).to.equal(`file://${testPath}`)
6161
expect(params.range).to.deep.equal({
6262
start: { line: 1, character: 2 },
6363
end: { line: 3, character: 4 },

test/auto-languageclient.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ describe("AutoLanguageClient", () => {
3131
})
3232

3333
it("does not select documents in unsupported language", () => {
34-
const editor = mockEditor("/path/to/somewhere", client.getGrammarScopes()[0] + "-dummy")
34+
const editor = mockEditor("/path/to/somewhere", `${client.getGrammarScopes()[0]}-dummy`)
3535
expect(client.shouldSyncForEditor(editor, "/path/to/somewhere")).equals(false)
3636
})
3737

3838
it("does not select documents in unsupported language outside of project", () => {
39-
const editor = mockEditor("/path/to/elsewhere/file", client.getGrammarScopes()[0] + "-dummy")
39+
const editor = mockEditor("/path/to/elsewhere/file", `${client.getGrammarScopes()[0]}-dummy`)
4040
expect(client.shouldSyncForEditor(editor, "/path/to/somewhere")).equals(false)
4141
})
4242
})

test/convert.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ describe("Convert", () => {
132132
it("uses getath which returns a path to create the URI", () => {
133133
const path = "/c/d/e/f/g/h/i/j.txt"
134134
const identifier = Convert.editorToTextDocumentIdentifier(createFakeEditor(path))
135-
expect(identifier.uri).equals("file://" + path)
135+
expect(identifier.uri).equals(`file://${path}`)
136136
})
137137
})
138138

@@ -142,7 +142,7 @@ describe("Convert", () => {
142142
const editor = createFakeEditor(path, "abc\ndefgh\nijkl")
143143
editor.setCursorBufferPosition(new Point(1, 2))
144144
const params = Convert.editorToTextDocumentPositionParams(editor)
145-
expect(params.textDocument.uri).equals("file://" + path)
145+
expect(params.textDocument.uri).equals(`file://${path}`)
146146
expect(params.position).deep.equals({ line: 1, character: 2 })
147147
})
148148

@@ -152,7 +152,7 @@ describe("Convert", () => {
152152
const editor = createFakeEditor(path, "abcdef\nghijkl\nmnopq")
153153
editor.setCursorBufferPosition(new Point(1, 1))
154154
const params = Convert.editorToTextDocumentPositionParams(editor, specifiedPoint)
155-
expect(params.textDocument.uri).equals("file://" + path)
155+
expect(params.textDocument.uri).equals(`file://${path}`)
156156
expect(params.position).deep.equals({ line: 911, character: 112 })
157157
})
158158
})

test/utils.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe("Utils", () => {
5050
it("returns the exe path under bin folder by default", () => {
5151
let expectedExe = join(process.cwd(), "bin", `${process.platform}-${process.arch}`, "serve-d")
5252
if (process.platform === "win32") {
53-
expectedExe = expectedExe + ".exe"
53+
expectedExe = `${expectedExe}.exe`
5454
}
5555

5656
const fsMock = sinon.mock(fs)
@@ -65,7 +65,7 @@ describe("Utils", () => {
6565
const rootPath = join(__dirname, `${process.platform}-${process.arch}`)
6666
let expectedExe = join(rootPath, "serve-d")
6767
if (process.platform === "win32") {
68-
expectedExe = expectedExe + ".exe"
68+
expectedExe = `${expectedExe}.exe`
6969
}
7070

7171
const fsMock = sinon.mock(fs)

0 commit comments

Comments
 (0)