Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Sep 8, 2024
1 parent cd5025d commit d581251
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 194 deletions.
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
package.json
test/valid-data/**/*.json
babel.config.cjs
jest.config.cjs
2 changes: 1 addition & 1 deletion bin/ts-json-schema-generator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node

// eslint-disable-next-line @typescript-eslint/no-require-imports
// eslint-disable-next-line no-undef
require("../dist/ts-json-schema-generator.js");
5 changes: 2 additions & 3 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import globals from "globals";
import tseslint from "typescript-eslint";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";

/** @type {import('@types/eslint').Linter.FlatConfig[]} */
/** @type {import('@types/eslint').Linter.Config[]} */
export default tseslint.config(
{
ignores: ["dist", "cjs", "build", "eslint.config.mjs"],
Expand All @@ -15,7 +15,6 @@ export default tseslint.config(
"index.ts",
"src/**/*.ts",
"factory/**/*.ts",
"bin/**",
"test/**/*.test.ts",
"test/utils.ts",
],
Expand Down Expand Up @@ -70,7 +69,7 @@ export default tseslint.config(
files: ["test/**/*.test.ts"],
languageOptions: {
globals: {
...globals.jest,
...globals.vitest,
...globals.commonjs,
},
},
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
"@eslint/js": "^9.10.0",
"@types/eslint": "^9.6.1",
"@types/glob": "^8.1.0",
"@types/jest": "^29.5.12",
"@types/node": "^22.5.4",
"@types/normalize-path": "^3.0.2",
"@vitest/coverage-v8": "^2.0.5",
Expand Down
2 changes: 1 addition & 1 deletion src/NodeParser/PrefixUnaryExpressionNodeParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class PrefixUnaryExpressionNodeParser implements SubNodeParser {
case ts.SyntaxKind.PlusToken:
return new LiteralType(+operand.getValue());
case ts.SyntaxKind.MinusToken:
return new LiteralType(-operand.getValue());
return new LiteralType(-(operand.getValue() as number));
case ts.SyntaxKind.TildeToken:
return new LiteralType(~operand.getValue());
case ts.SyntaxKind.ExclamationToken:
Expand Down
33 changes: 33 additions & 0 deletions test/vega-lite/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -28308,6 +28308,11 @@
],
"description": "For text marks, the vertical text baseline. One of `\"alphabetic\"` (default), `\"top\"`, `\"middle\"`, `\"bottom\"`, `\"line-top\"`, `\"line-bottom\"`, or an expression reference that provides one of the valid values. The `\"line-top\"` and `\"line-bottom\"` values operate similarly to `\"top\"` and `\"bottom\"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Note:__ Expression reference is *not* supported for range marks."
},
"binSpacing": {
"description": "Offset between bars for binned field. The ideal value for this is either 0 (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).\n\n__Default value:__ `1`",
"minimum": 0,
"type": "number"
},
"blend": {
"anyOf": [
{
Expand All @@ -28333,6 +28338,11 @@
],
"description": "Default color.\n\n__Default value:__ <span style=\"color: #4682b4;\">&#9632;</span> `\"#4682b4\"`\n\n__Note:__\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`."
},
"continuousBandSize": {
"description": "The default size of the bars on continuous scales.\n\n__Default value:__ `5`",
"minimum": 0,
"type": "number"
},
"cornerRadius": {
"anyOf": [
{
Expand Down Expand Up @@ -28421,6 +28431,18 @@
}
]
},
"discreteBandSize": {
"anyOf": [
{
"type": "number"
},
{
"$ref": "#/definitions/RelativeBandSize"
}
],
"description": "The default size of the bars with discrete dimensions. If unspecified, the default size is `step-2`, which provides 2 pixel offset between bars.",
"minimum": 0
},
"dx": {
"anyOf": [
{
Expand Down Expand Up @@ -28633,6 +28655,17 @@
}
]
},
"minBandSize": {
"anyOf": [
{
"type": "number"
},
{
"$ref": "#/definitions/ExprRef"
}
],
"description": "The minimum band size for bar and rectangle marks. __Default value:__ `0.25`"
},
"opacity": {
"anyOf": [
{
Expand Down
Loading

0 comments on commit d581251

Please sign in to comment.