Skip to content

Commit

Permalink
feat: stop requiring a configuration file (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
nhedger authored Dec 7, 2023
1 parent a52ac94 commit c8daa72
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,6 @@
"type": ["boolean", "null"],
"default": null,
"markdownDescription": "Enable/Disable Biome handling renames in the workspace. (Experimental)"
},
"biome.requireConfiguration": {
"type": "boolean",
"default": true,
"markdownDescription": "Require a Biome configuration file to enable syntax errors, formatting and linting."
}
}
}
Expand Down
21 changes: 0 additions & 21 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ export async function activate(context: ExtensionContext) {
}
}

const requiresConfiguration = workspace
.getConfiguration("biome")
.get<boolean>("requireConfiguration");

commands.registerCommand(Commands.StopServer, async () => {
if (!client) {
return;
Expand Down Expand Up @@ -97,23 +93,6 @@ export async function activate(context: ExtensionContext) {
await context.globalState.update("biome_versions_cache", undefined);
});

// If the extension requires a configuration file to be present, we attempt to
// locate it. If a config file cannot be found, we do not go any further.
if (requiresConfiguration) {
outputChannel.appendLine("Configuration file required, looking for one.");
// TODO: Stop looking for rome.json when we reach biome v2.0
const configFiles = await workspace.findFiles("**/{biome,rome}.json");
if (configFiles.length === 0) {
outputChannel.appendLine(
"No config file found, disabling Biome extension",
);
return;
}
outputChannel.appendLine(
`Config file found at ${configFiles[0].fsPath}, enabling Biome extension`,
);
}

let server = await getServerPath(context, outputChannel);

if (!server.command) {
Expand Down

0 comments on commit c8daa72

Please sign in to comment.