Skip to content

Commit

Permalink
fixing linting
Browse files Browse the repository at this point in the history
  • Loading branch information
DaanV2 committed Nov 8, 2024
1 parent dd54689 commit c388695
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/src/schema-tester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export namespace Schema {

export async function getSchema(uri: string): Promise<string> {
const rootfolder = Files.RootFolder();
const filepath = path.normalize(uri.replace("https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/", rootfolder));
const filepath = uri.replace("https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/", rootfolder);

if (!existsSync(filepath)) {
throw new Error("file doesn't exist: " + filepath);
Expand All @@ -52,15 +52,12 @@ export namespace Schema {

data["json.schemas"].forEach((m) => {
if (m) {
const schema = path.normalize(m.url.replace("https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/", rootfolder));

let matches = m.fileMatch;
if (typeof matches === "string") {
matches = [matches];
}
const u = schema.replace(/\\/g, "/");

schemas.push({ uri: u, fileMatch: matches });
schemas.push({ uri: m.url, fileMatch: matches });
}
});

Expand Down

0 comments on commit c388695

Please sign in to comment.