Skip to content

Commit 394e1aa

Browse files
committed
Fixed formatting issues causing tslint to error out during build
1 parent c5e0220 commit 394e1aa

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

src/arduino/programmerManager.ts

+12-13
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as fs from "fs";
22
import * as path from "path";
33
import * as vscode from "vscode";
4-
import * as util from "../common/util";
54
import * as constants from "../common/constants";
5+
import * as util from "../common/util";
66
import { DeviceContext } from "../deviceContext";
77
import { ArduinoApp } from "./arduino";
88
import { IArduinoSettings } from "./arduinoSettings";
@@ -14,7 +14,7 @@ export class ProgrammerManager {
1414
private _currentProgrammerName: string;
1515

1616
private _programmerStatusBar: vscode.StatusBarItem;
17-
17+
1818
private _programmers: Map<string, string>;
1919

2020
constructor(private _settings: IArduinoSettings, private _arduinoApp: ArduinoApp) {
@@ -29,8 +29,7 @@ export class ProgrammerManager {
2929
return this._programmers.get(this._currentProgrammerName);
3030
}
3131

32-
public loadConfig()
33-
{
32+
public loadConfig() {
3433
this.loadProgrammers();
3534

3635
this.updateStatusBar();
@@ -42,14 +41,15 @@ export class ProgrammerManager {
4241
}
4342

4443
public async selectProgrammer() {
45-
const chosen: string | undefined = await vscode.window.showQuickPick(Array.from(this._programmers.keys()), { placeHolder: "Select programmer" });
44+
const chosen: string | undefined = await vscode.window.showQuickPick(Array.from(this._programmers.keys()),
45+
{ placeHolder: "Select programmer" });
4646

4747
if (!chosen) {
4848
return;
4949
}
5050

5151
this._currentProgrammerName = chosen;
52-
52+
5353
this._programmerStatusBar.text = this._currentProgrammerName;
5454
const dc = DeviceContext.getInstance();
5555
dc.programmer = this._currentProgrammerName;
@@ -60,15 +60,16 @@ export class ProgrammerManager {
6060
const boardLineRegex = /([^\.]+)\.(\S+)=(.+)/;
6161

6262
this._arduinoApp.boardManager.platforms.forEach(((plat) => {
63-
if (plat.rootBoardPath === undefined)
63+
if (plat.rootBoardPath === undefined) {
6464
return;
65+
}
6566

6667
const programmmerFilePath = path.join(plat.rootBoardPath, "programmers.txt");
6768

6869
if (util.fileExistsSync(programmmerFilePath)) {
6970
const boardContent = fs.readFileSync(programmmerFilePath, "utf8");
7071
const lines = boardContent.split(/[\r|\r\n|\n]/);
71-
72+
7273
lines.forEach((line) => {
7374
// Ignore comments.
7475
if (line.startsWith("#")) {
@@ -77,9 +78,8 @@ export class ProgrammerManager {
7778

7879
const match = boardLineRegex.exec(line);
7980
if (match && match.length > 3) {
80-
if (match[2] === "name")
81-
{
82-
this._programmers.set(match[3], match[1])
81+
if (match[2] === "name") {
82+
this._programmers.set(match[3], match[1]);
8383
}
8484
}
8585
});
@@ -88,8 +88,7 @@ export class ProgrammerManager {
8888
}
8989

9090
private updateStatusBar(show: boolean = true): void {
91-
if (show)
92-
{
91+
if (show) {
9392
this._programmerStatusBar.show();
9493
const dc = DeviceContext.getInstance();
9594
const selectedProgrammer = this._programmers.get(dc.programmer);

0 commit comments

Comments
 (0)