-
-
Notifications
You must be signed in to change notification settings - Fork 883
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: import keyword definiions (rather than require)
- Loading branch information
1 parent
c5c1b84
commit 61e7520
Showing
32 changed files
with
226 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,4 @@ const def: CodeKeywordDefinition = { | |
}, | ||
} | ||
|
||
module.exports = def | ||
export default def |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,4 +44,4 @@ const def: CodeKeywordDefinition = { | |
}, | ||
} | ||
|
||
module.exports = def | ||
export default def |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,4 +40,4 @@ const def: CodeKeywordDefinition = { | |
}, | ||
} | ||
|
||
module.exports = def | ||
export default def |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,37 @@ | ||
import type {Vocabulary} from "../../types" | ||
import additionalItems from "./additionalItems" | ||
import items from "./items" | ||
import contains from "./contains" | ||
import dependencies from "./dependencies" | ||
import propertyNames from "./propertyNames" | ||
import additionalProperties from "./additionalProperties" | ||
import properties from "./properties" | ||
import patternProperties from "./patternProperties" | ||
import notKeyword from "./not" | ||
import anyOf from "./anyOf" | ||
import oneOf from "./oneOf" | ||
import allOf from "./allOf" | ||
import ifKeyword from "./if" | ||
import thenElse from "./thenElse" | ||
|
||
const applicator: Vocabulary = [ | ||
// array | ||
require("./additionalItems"), | ||
require("./items"), | ||
require("./contains"), | ||
additionalItems, | ||
items, | ||
contains, | ||
// object | ||
require("./dependencies"), | ||
require("./propertyNames"), | ||
require("./additionalProperties"), | ||
require("./properties"), | ||
require("./patternProperties"), | ||
dependencies, | ||
propertyNames, | ||
additionalProperties, | ||
properties, | ||
patternProperties, | ||
// any | ||
require("./not"), | ||
require("./anyOf"), | ||
require("./oneOf"), | ||
require("./allOf"), | ||
require("./if"), | ||
require("./thenElse"), | ||
notKeyword, | ||
anyOf, | ||
oneOf, | ||
allOf, | ||
ifKeyword, | ||
thenElse, | ||
] | ||
|
||
export default applicator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,4 +48,4 @@ const def: CodeKeywordDefinition = { | |
}, | ||
} | ||
|
||
module.exports = def | ||
export default def |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,4 +37,4 @@ const def: CodeKeywordDefinition = { | |
}, | ||
} | ||
|
||
module.exports = def | ||
export default def |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,4 +61,4 @@ const def: CodeKeywordDefinition = { | |
}, | ||
} | ||
|
||
module.exports = def | ||
export default def |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,4 +47,4 @@ const def: CodeKeywordDefinition = { | |
}, | ||
} | ||
|
||
module.exports = def | ||
export default def |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,4 @@ const def: CodeKeywordDefinition = { | |
}, | ||
} | ||
|
||
module.exports = def | ||
export default def |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import type {Vocabulary} from "../../types" | ||
import refKeyword from "./ref" | ||
|
||
const core: Vocabulary = ["$schema", "$id", "$defs", "definitions", require("./ref")] | ||
const core: Vocabulary = ["$schema", "$id", "$defs", "definitions", refKeyword] | ||
|
||
export default core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.