Skip to content

Update biome config #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .prettierignore

This file was deleted.

11 changes: 9 additions & 2 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
"clientKind": "git",
"useIgnoreFile": true
},
"linter": { "enabled": false },
"formatter": { "ignore": ["package-lock.json"] }
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"formatter": {
"ignore": ["package-lock.json"]
}
}
12 changes: 6 additions & 6 deletions extension.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PythonExtension } from "@vscode/python-extension";
import * as fs from "node:fs";
import * as path from "node:path";
import { PythonExtension } from "@vscode/python-extension";
import * as vscode from "vscode";
import {
LanguageClient,
Expand All @@ -15,7 +15,7 @@ let SORTED_WORKSPACE_FOLDERS = getSortedWorkspaceFolders();

function normalizeFolderUri(workspaceFolder: vscode.WorkspaceFolder) {
const uri = workspaceFolder.uri.toString();
return uri.charAt(uri.length - 1) === "/" ? uri : uri + "/";
return uri.charAt(uri.length - 1) === "/" ? uri : `${uri}/`;
}

function getSortedWorkspaceFolders() {
Expand All @@ -39,7 +39,7 @@ async function getPythonExtension() {
try {
return await PythonExtension.api();
} catch {
outputChannel?.info(`python extension not installed`);
outputChannel?.info("python extension not installed");
return;
}
}
Expand Down Expand Up @@ -137,12 +137,12 @@ function createClientManager() {
) {
const outerMostFolder = getOuterMostWorkspaceFolder(workspaceFolder);
const outerMostFolderUri = outerMostFolder.uri.toString();
if (workspaceFolder.uri.toString() != outerMostFolderUri) {
if (workspaceFolder.uri.toString() !== outerMostFolderUri) {
await _stopClient(workspaceFolder);
}

const cachedExecutable = allExecutables.get(outerMostFolderUri);
let newExecutable;
let newExecutable: string | null | undefined;
if (cachedExecutable === undefined) {
newExecutable = await findServerExecutable(outerMostFolder);
allExecutables.set(outerMostFolderUri, newExecutable ?? null);
Expand All @@ -153,7 +153,7 @@ function createClientManager() {
const outerMostOldEntry = allClients.get(outerMostFolderUri);
if (outerMostOldEntry) {
const [oldExecutable, _] = outerMostOldEntry;
if (oldExecutable == newExecutable) {
if (oldExecutable === newExecutable) {
return;
}
await _stopClient(outerMostFolder);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}
},
"scripts": {
"lint": "biome format --write .",
"lint": "biome check --write --unsafe",
"compile": "webpack --mode development",
"watch": "webpack --mode development --watch",
"vscode:prepublish": "npm run package",
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const extensionConfig = {
mode: "none",

output: {
path: require("path").resolve(__dirname, "dist"),
path: require("node:path").resolve(__dirname, "dist"),
filename: "extension.js",
libraryTarget: "commonjs2",
devtoolModuleFilenameTemplate: "../[resource-path]",
Expand Down