Skip to content

Commit

Permalink
chore: auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 11, 2024
1 parent 5d6a7f2 commit 55d356d
Show file tree
Hide file tree
Showing 15 changed files with 10 additions and 21 deletions.
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default [
prettierRecommendedConfig,
tsStylisticConfig,
...tseslint.configs.stylistic,
];
*/
/*
Expand Down
4 changes: 2 additions & 2 deletions packages/ansible-language-server/src/services/ansibleLint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ export class AnsibleLint {
const progressTracker = this.useProgressTracker
? await this.connection.window.createWorkDoneProgress()
: {
begin: () => {},
done: () => {},
begin: () => {},
done: () => {},
};

progressTracker.begin("ansible-lint", undefined, "Processing files...");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export class AnsiblePlaybook {
const progressTracker = this.useProgressTracker
? await this.connection.window.createWorkDoneProgress()
: {
begin: () => {},
done: () => {},
begin: () => {},
done: () => {},
};

const workingDirectory = URI.parse(this.context.workspaceFolder.uri).path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ function testAnsibleSyntaxCheckNoHost(
diagnosticReport: [
{
severity: 1,

message: "the field 'hosts' is required but was not set",
range: {
start: { line: 0, character: 0 } as Position,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,11 @@ const settingsReadmeFileUri = path.join(__dirname, "..", "docs", "settings.md");
// Register a special function for handlebars to deal with comparison of stringed value of false
// Else, normal #if treats it as boolean, even after converting booleans to strings in typescript
Handlebars.registerHelper("ifEqualsFalse", function (arg1, options) {

return arg1.toString() === "false" ? options.fn(this) : options.inverse(this);
});

// Register a special function for handlebars to deal with the checking of "list" as value type of settings
Handlebars.registerHelper("ifValueArray", function (arg1, options) {

return arg1.toString() === "list" ? options.fn(this) : options.inverse(this);
});

Expand Down
1 change: 0 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,6 @@ async function resyncAnsibleInventory(): Promise<void> {
}
}


async function getAuthToken(): Promise<void> {
if (
!(await workspace.getConfiguration("ansible").get("lightspeed.enabled"))
Expand Down
6 changes: 2 additions & 4 deletions src/features/ansibleTox/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ export class AnsibleToxController {
}

const splittedPath = uri.path.split("/");

const fileName = splittedPath.pop()!;

const parentFolderName = splittedPath.pop()!;

const file = this.controller.createTestItem(uri.toString(), fileName, uri);
Expand Down Expand Up @@ -185,7 +185,6 @@ export class AnsibleToxController {
const queue: vscode.TestItem[] = [...(request.include || [])];

while (queue.length > 0 && !token.isCancellationRequested) {

const test = queue.pop()!;

if (request.exclude?.includes(test)) {
Expand All @@ -194,7 +193,6 @@ export class AnsibleToxController {

const start = Date.now();
try {

const cwd = vscode.workspace.getWorkspaceFolder(test.uri!)?.uri.path;
runTox(
[test.label.split("->")[0].trim()],
Expand Down
2 changes: 1 addition & 1 deletion src/features/lightspeed/lightSpeedOAuthProvider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-explicit-any */

import {
authentication,
AuthenticationProvider,
Expand Down
1 change: 0 additions & 1 deletion src/features/lightspeed/utils/feedbackView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ export function setWebviewMessageListener(
webview: Webview,
disposables: Disposable[] = [],
) {

webview.onDidReceiveMessage(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(message: any) => {
Expand Down
2 changes: 1 addition & 1 deletion src/features/lightspeed/utils/promiseHandlers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-explicit-any */

import { Disposable, Event, EventEmitter } from "vscode";

export interface PromiseAdapter<T, U> {
Expand Down
1 change: 0 additions & 1 deletion src/features/pythonMetadata.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import {
ExtensionContext,
window,
Expand Down
1 change: 0 additions & 1 deletion src/treeView.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import * as vscode from "vscode";
import {
LightspeedAuthSession,
Expand Down
1 change: 0 additions & 1 deletion test/mockLightspeedServer/contentmatches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const NO_MATCHES = {
],
};


export function contentmatches(_req: {
body: { model: string; suggestions: [string]; suggestionId?: string };
}) {
Expand Down
1 change: 0 additions & 1 deletion test/testScripts/diagnostics/testAnsibleWithoutEE.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import * as vscode from "vscode";
import { integer } from "vscode-languageclient";
import {
Expand Down
1 change: 0 additions & 1 deletion test/testScripts/diagnostics/testYamlWithoutEE.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import * as vscode from "vscode";
import { integer } from "vscode-languageclient";
import {
Expand Down

0 comments on commit 55d356d

Please sign in to comment.