Unverified Commit 458eb251 authored by Hong Minhee's avatar Hong Minhee
Browse files

Fix lint errors

parent e163d492
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+1 −0
Original line number Diff line number Diff line
deno.lock
+1 −0
Original line number Diff line number Diff line
@@ -68,6 +68,7 @@ export async function* generateClasses(
  runtimePath: string,
): AsyncIterable<string> {
  runtimePath = runtimePath.replace(/\/+$/, "");
  yield "// deno-lint-ignore-file ban-unused-ignore\n";
  yield 'import jsonld from "npm:jsonld@8.3.2";';
  yield `import { LanguageTag, parseLanguageTag }
    from "npm:@phensley/language-tag@1.8.0";\n`;
+2 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ export async function* generateEncoder(
      ...options,
      documentLoader: options.documentLoader ?? fetchDocumentLoader,
    };
    // deno-lint-ignore no-unused-vars prefer-const
    let array: unknown[];
  `;
  if (type.extends == null) {
@@ -90,6 +91,7 @@ export async function* generateDecoder(
      documentLoader: options.documentLoader ?? fetchDocumentLoader,
    };
    const expanded = await jsonld.expand(json, options);
    // deno-lint-ignore no-explicit-any
    const values = expanded[0] as (Record<string, any[]> & { "@id"?: string });
  `;
  const subtypes = getSubtypes(typeUri, types, true);
+1 −1
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ export async function* generateCloner(
  yield ` = {}): ${type.name} {\n`;
  if (type.extends == null) {
    yield `
    // @ts-ignore
    // @ts-ignore: this.constructor is not recognized as a constructor, but it is.
    const clone: ${type.name} = new this.constructor({ id: values.id });
    `;
  } else {
+2 −2
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ export async function* generateInspector(
        [Symbol.for("Deno.customInspect")]: (
          inspect: typeof Deno.inspect,
          options: Deno.InspectOptions,
        ) => "URL " + inspect(this.id!.href),
        ) => "URL " + inspect(this.id!.href, options),
      };
    }
    `;
@@ -37,7 +37,7 @@ export async function* generateInspector(
            [Symbol.for("Deno.customInspect")]: (
              inspect: typeof Deno.inspect,
              options: Deno.InspectOptions,
            ) => "URL " + inspect(v.href)
            ) => "URL " + inspect(v.href, options)
          }
        : v);
      `;
Loading