Skip to content

Commit

Permalink
Update deps, enforce return type.
Browse files Browse the repository at this point in the history
  • Loading branch information
dscalzi committed Mar 20, 2021
1 parent 07ea0e8 commit 2540ca3
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 78 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
}
}
],
"@typescript-eslint/no-non-null-assertion": "off"
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-function-return-type": ["warn"]
}
}
143 changes: 76 additions & 67 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
"@types/fs-extra": "^9.0.8",
"@types/luxon": "^1.26.2",
"@types/minimatch": "^3.0.3",
"@types/node": "^14.14.32",
"@types/node": "^14.14.35",
"@types/triple-beam": "^1.3.2",
"@types/yargs": "^16.0.0",
"@typescript-eslint/eslint-plugin": "^4.16.1",
"@typescript-eslint/parser": "^4.16.1",
"eslint": "^7.21.0",
"@typescript-eslint/eslint-plugin": "^4.18.0",
"@typescript-eslint/parser": "^4.18.0",
"eslint": "^7.22.0",
"rimraf": "^3.0.2",
"typescript": "^4.2.3"
},
Expand All @@ -49,7 +49,7 @@
"node-stream-zip": "^1.13.2",
"toml": "^3.0.0",
"triple-beam": "^1.3.0",
"ts-json-schema-generator": "^0.88.0",
"ts-json-schema-generator": "^0.89.0",
"winston": "^3.3.3",
"yargs": "^16.2.0"
}
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function getBaseURL(): string {
return (new URL(baseUrl)).toString()
}

function installLocalOption(yargs: yargs.Argv) {
function installLocalOption(yargs: yargs.Argv): yargs.Argv {
return yargs.option('installLocal', {
describe: 'Install the generated distribution to your local Helios data folder.',
type: 'boolean',
Expand Down
6 changes: 3 additions & 3 deletions src/structure/spec_model/module/ToggleableModule.struct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ export abstract class ToggleableModuleStructure extends ModuleStructure {
protected getNamespaceMapper(namespace: ToggleableNamespace): (x: Module) => void {
switch(namespace) {
case ToggleableNamespace.REQUIRED:
return () => { /* do nothing */ }
return (): void => { /* do nothing */ }
case ToggleableNamespace.OPTIONAL_ON:
return (x) => x.required = { value: false }
return (x): void => { x.required = { value: false } }
case ToggleableNamespace.OPTIONAL_OFF:
return (x) => x.required = { value: false, def: false }
return (x): void => { x.required = { value: false, def: false } }
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/util/SchemaUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export enum SchemaTypes {
ServerMetaSchema = 'ServerMetaSchema'
}

function getSchemaFileName(typeName: string) {
function getSchemaFileName(typeName: string): string {
return `${typeName}.schema.json`
}

Expand Down

0 comments on commit 2540ca3

Please sign in to comment.