Skip to content

Commit 0ece108

Browse files
committed
Cleaning up and removing oxlint issues
1 parent 3555432 commit 0ece108

6 files changed

Lines changed: 4 additions & 19 deletions

File tree

src/error-handlers/contains.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ import * as Instance from "@hyperjump/json-schema/instance/experimental";
66

77
/** @type ErrorHandler */
88
const containsErrorHandler = (normalizedErrors, instance, localization, resolver) => {
9-
/** @type {{
10-
* getSiblingKeywordValue?: (schemaLocation: string, siblingKeywordUri: string) =>
11-
* { keywordLocation: string; keywordValue: unknown } | undefined
12-
* } | undefined} */
139
if (!resolver?.getSiblingKeywordValue) {
1410
throw new Error("Missing resolver.getSiblingKeywordValue in error handler context");
1511
}

src/error-handlers/maximum.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ import * as Instance from "@hyperjump/json-schema/instance/experimental";
66

77
/** @type ErrorHandler */
88
const maximumErrorHandler = (normalizedErrors, instance, localization, resolver) => {
9-
/** @type {{
10-
* getCompiledKeywordValue?: (schemaLocation: string) => unknown;
11-
* getSiblingKeywordValue?: (schemaLocation: string, siblingKeywordUri: string) =>
12-
* { keywordLocation: string; keywordValue: unknown } | undefined
13-
* } | undefined} */
149
if (!resolver?.getCompiledKeywordValue || !resolver.getSiblingKeywordValue) {
1510
throw new Error("Missing resolver functions in error handler context");
1611
}

src/error-handlers/minimum.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ import * as Instance from "@hyperjump/json-schema/instance/experimental";
66

77
/** @type ErrorHandler */
88
const minimumErrorHandler = (normalizedErrors, instance, localization, resolver) => {
9-
/** @type {{
10-
* getCompiledKeywordValue?: (schemaLocation: string) => unknown;
11-
* getSiblingKeywordValue?: (schemaLocation: string, siblingKeywordUri: string) =>
12-
* { keywordLocation: string; keywordValue: unknown } | undefined
13-
* } | undefined} */
149
if (!resolver?.getCompiledKeywordValue || !resolver.getSiblingKeywordValue) {
1510
throw new Error("Missing resolver functions in error handler context");
1611
}

src/error-handlers/typeConstEnum.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as Instance from "@hyperjump/json-schema/instance/experimental";
2-
import jsonStringify from "json-stringify-deterministic";
32

43
/**
54
* @import { ErrorHandler, Json } from "../index.d.ts"

src/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export type ErrorResolver = {
147147
getSiblingKeywordValue: (
148148
schemaLocation: string,
149149
siblingKeywordUri: string
150-
) => { keywordLocation: string; keywordValue: unknown } | undefined;
150+
) => { keywordLocation: string; keywordValue: unknown } | undefined;
151151
};
152152

153153
/**

src/json-schema-errors.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ async function normalizedOutput(value, errorOutput, subjectUri) {
3636
const schema = await getSchema(subjectUri);
3737
const errorIndex = await constructErrorIndex(errorOutput, schema);
3838
const { schemaUri, ast } = await compile(schema);
39-
return {
40-
normalizedErrors: evaluateSchema(schemaUri, value, { ast, errorIndex, plugins: [...ast.plugins] }),
41-
ast
39+
return {
40+
normalizedErrors: evaluateSchema(schemaUri, value, { ast, errorIndex, plugins: [...ast.plugins] }),
41+
ast
4242
};
4343
}
4444

0 commit comments

Comments
 (0)