Skip to content

Commit

Permalink
Fix eslint error & CI check (#816)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpodsiad authored Jan 12, 2022
1 parent 64a9b85 commit 389e756
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ jobs:
with:
node-version: "14"
- run: yarn install
- run: yarn eslint
- run: yarn eslint .
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@
"build": "vsce package --yarn",
"vscode:publish": "vsce publish --yarn",
"ovsx:publish": "ovsx publish",
"lint": "eslint . --ext .ts --fix",
"lint": "eslint . --ext .ts --fix && yarn format",
"format": "prettier --write '**/*.{ts,js,json,yml}'",
"format-check": "prettier --check '**/*.{ts,js,json,yml}'"
},
Expand Down
4 changes: 3 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,9 @@ function launchMetals(
registerCommand(
`metals.${ServerCommands.GotoPosition}`,
(location: Location) => {
if (location) gotoLocation(location, false);
if (location) {
gotoLocation(location, false);
}
}
);

Expand Down
6 changes: 4 additions & 2 deletions src/scalaDebugger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ScalaMainConfigProvider implements vscode.DebugConfigurationProvider {
_folder: WorkspaceFolder | undefined,
debugConfiguration: DebugConfiguration
): ProviderResult<DebugConfiguration> {
let editor = vscode.window.activeTextEditor;
const editor = vscode.window.activeTextEditor;
// debugConfiguration.type is undefined if there are no configurations
// we are running whatever is in the file
if (debugConfiguration.type === undefined && editor) {
Expand All @@ -94,7 +94,9 @@ class ScalaMainConfigProvider implements vscode.DebugConfigurationProvider {
commands.executeCommand("workbench.panel.repl.view.focus");
return configuration;
});
} else return debugConfiguration;
} else {
return debugConfiguration;
}
}
}

Expand Down

0 comments on commit 389e756

Please sign in to comment.