Skip to content

Commit 90528c1

Browse files
committed
Fixed standard warnings
1 parent d11059e commit 90528c1

File tree

3 files changed

+34
-34
lines changed

3 files changed

+34
-34
lines changed

index.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ function refFinder (ref, location) {
609609
return {
610610
schema: externalSchema[ref],
611611
root: externalSchema[ref],
612-
externalSchema: externalSchema
612+
externalSchema
613613
}
614614
}
615615

@@ -622,9 +622,9 @@ function refFinder (ref, location) {
622622
root = schemaReferenceMap.get(ref[0])
623623
if (schema.$ref) {
624624
return refFinder(schema.$ref, {
625-
schema: schema,
626-
root: root,
627-
externalSchema: externalSchema
625+
schema,
626+
root,
627+
externalSchema
628628
})
629629
}
630630
} else if (ref[0]) { // If external file
@@ -637,9 +637,9 @@ function refFinder (ref, location) {
637637

638638
if (schema.$ref) {
639639
return refFinder(schema.$ref, {
640-
schema: schema,
641-
root: root,
642-
externalSchema: externalSchema
640+
schema,
641+
root,
642+
externalSchema
643643
})
644644
}
645645
}
@@ -666,8 +666,8 @@ function refFinder (ref, location) {
666666

667667
return {
668668
schema: dereferenced,
669-
root: root,
670-
externalSchema: externalSchema
669+
root,
670+
externalSchema
671671
}
672672
} else {
673673
// eslint-disable-next-line
@@ -688,16 +688,16 @@ function refFinder (ref, location) {
688688

689689
if (result.$ref) {
690690
return refFinder(result.$ref, {
691-
schema: schema,
692-
root: root,
693-
externalSchema: externalSchema
691+
schema,
692+
root,
693+
externalSchema
694694
})
695695
}
696696

697697
return {
698698
schema: result,
699-
root: root,
700-
externalSchema: externalSchema
699+
root,
700+
externalSchema
701701
}
702702

703703
function findBadKey (obj, keys) {
@@ -828,7 +828,7 @@ function buildCode (location, code, laterCode, name) {
828828
laterCode = builtCode.laterCode
829829
}
830830

831-
return { code: code, laterCode: laterCode }
831+
return { code, laterCode }
832832
}
833833

834834
function filterRequired (required, key) {
@@ -852,7 +852,7 @@ function buildCodeWithAllOfs (location, code, laterCode, name) {
852852
laterCode = builtCode.laterCode
853853
}
854854

855-
return { code: code, laterCode: laterCode }
855+
return { code, laterCode }
856856
}
857857

858858
function buildInnerObject (location, name) {
@@ -923,7 +923,7 @@ function addIfThenElse (location, name) {
923923
code += `
924924
}
925925
`
926-
return { code: code, laterCode: laterCode }
926+
return { code, laterCode }
927927
}
928928

929929
function toJSON (variableName) {

test/if-then-else.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,13 @@ t.test('if-then-else', t => {
261261
const tests = [
262262
{
263263
name: 'foobar',
264-
schema: schema,
264+
schema,
265265
input: fooBarInput,
266266
expected: foobarOutput
267267
},
268268
{
269269
name: 'greeting',
270-
schema: schema,
270+
schema,
271271
input: greetingInput,
272272
expected: greetingOutput
273273
},

test/nullable.test.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ const nullable = true
99
const complexObject = {
1010
type: 'object',
1111
properties: {
12-
nullableString: { type: 'string', nullable: nullable },
13-
nullableNumber: { type: 'number', nullable: nullable },
14-
nullableInteger: { type: 'integer', nullable: nullable },
15-
nullableBoolean: { type: 'boolean', nullable: nullable },
16-
nullableNull: { type: 'null', nullable: nullable },
12+
nullableString: { type: 'string', nullable },
13+
nullableNumber: { type: 'number', nullable },
14+
nullableInteger: { type: 'integer', nullable },
15+
nullableBoolean: { type: 'boolean', nullable },
16+
nullableNull: { type: 'null', nullable },
1717
nullableArray: {
1818
type: 'array',
1919
nullable: true,
@@ -25,11 +25,11 @@ const complexObject = {
2525
nullable: false,
2626
additionalProperties: true,
2727
properties: {
28-
nullableString: { type: 'string', nullable: nullable },
29-
nullableNumber: { type: 'number', nullable: nullable },
30-
nullableInteger: { type: 'integer', nullable: nullable },
31-
nullableBoolean: { type: 'boolean', nullable: nullable },
32-
nullableNull: { type: 'null', nullable: nullable },
28+
nullableString: { type: 'string', nullable },
29+
nullableNumber: { type: 'number', nullable },
30+
nullableInteger: { type: 'integer', nullable },
31+
nullableBoolean: { type: 'boolean', nullable },
32+
nullableNull: { type: 'null', nullable },
3333
nullableArray: {
3434
type: 'array',
3535
nullable: true,
@@ -86,11 +86,11 @@ const complexExpectedResult = {
8686
}
8787

8888
const testSet = {
89-
nullableString: [{ type: 'string', nullable: nullable }, null, null],
90-
nullableNumber: [{ type: 'number', nullable: nullable }, null, null],
91-
nullableInteger: [{ type: 'integer', nullable: nullable }, null, null],
92-
nullableBoolean: [{ type: 'boolean', nullable: nullable }, null, null],
93-
nullableNull: [{ type: 'null', nullable: nullable }, null, null],
89+
nullableString: [{ type: 'string', nullable }, null, null],
90+
nullableNumber: [{ type: 'number', nullable }, null, null],
91+
nullableInteger: [{ type: 'integer', nullable }, null, null],
92+
nullableBoolean: [{ type: 'boolean', nullable }, null, null],
93+
nullableNull: [{ type: 'null', nullable }, null, null],
9494
nullableArray: [{
9595
type: 'array',
9696
nullable: true,

0 commit comments

Comments
 (0)