Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Feb 11, 2025
1 parent a029b80 commit 2d9f1ac
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
14 changes: 6 additions & 8 deletions examples/examples.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Ajv, {ErrorObject} from 'ajv';
import {Ajv, ErrorObject} from 'ajv';
import addFormats from 'ajv-formats';
import draft6Schema from 'ajv/lib/refs/json-schema-draft-06.json';
import fs from 'fs';
Expand All @@ -16,7 +16,7 @@ import {duplicate} from '../src/util.js';
const ajv = new Ajv({
allowUnionTypes: true,
strictTypes: false,
strictTuples: false,
strictTuples: false
});

ajv.addFormat('color-hex', () => true);
Expand Down Expand Up @@ -59,10 +59,8 @@ function validateVega(vegaSpec: VgSpec) {
const BROKEN_SUFFIX = '_broken.vl.json';
const FUTURE_SUFFIX = '_future.vl.json';

const examples = fs.readdirSync('examples/specs').map((file) => `examples/specs/${file}`);
const normalizedExamples = fs
.readdirSync('examples/specs/normalized')
.map((file) => `examples/specs/normalized/${file}`);
const examples = fs.readdirSync('examples/specs').map(file => `examples/specs/${file}`);
const normalizedExamples = fs.readdirSync('examples/specs/normalized').map(file => `examples/specs/normalized/${file}`);

for (const example of [...examples, ...normalizedExamples]) {
if (path.extname(example) !== '.json') {
Expand All @@ -74,7 +72,7 @@ for (const example of [...examples, ...normalizedExamples]) {
describe(
// eslint-disable-next-line jest/valid-describe-callback, jest/valid-title
example,
log.wrap((localLogger) => {
log.wrap(localLogger => {
const vegaSpec: VgSpec = compile(jsonSpec).spec;

it('should not cause any side effects', () => {
Expand Down Expand Up @@ -105,6 +103,6 @@ for (const example of [...examples, ...normalizedExamples]) {

validateVega(vegaSpec);
});
}),
})
);
}
2 changes: 1 addition & 1 deletion examples/schema.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Ajv from 'ajv';
import {Ajv} from 'ajv';
import {inspect} from 'util';
import specSchema from '../build/vega-lite-schema.json';

Expand Down
3 changes: 2 additions & 1 deletion prettier.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const config = {
options: {
bracketSpacing: false,
singleQuote: true,
trailingComma: 'all'
trailingComma: 'all',
arrowParens: 'always'
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion src/compositemark/boxplot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
makeCompositeAggregatePartFactory,
partLayerMixins,
PartsMixins
} from './common';
} from './common.js';

export const BOXPLOT = 'boxplot' as const;
export type BoxPlot = typeof BOXPLOT;
Expand Down

0 comments on commit 2d9f1ac

Please sign in to comment.