Skip to content

Commit

Permalink
chore(tsconfig): disable strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Sep 19, 2023
1 parent 3b956cb commit ec0f6dc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
10 changes: 0 additions & 10 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,49 +26,39 @@ function parseOptions(acceptedOptions, options, version) {
const invalidArgs = [];
Object.keys(options).forEach((key) => {
if (Object.hasOwn(acceptedOptions, key)) {
// @ts-ignore
// eslint-disable-next-line valid-typeof
if (typeof options[key] === acceptedOptions[key].type) {
// Skip boolean options if false
// @ts-ignore
if (acceptedOptions[key].type === "boolean" && !options[key]) {
return;
}
// @ts-ignore
args.push(acceptedOptions[key].arg);
} else {
invalidArgs.push(
`Invalid value type provided for option '${key}', expected ${
// @ts-ignore
acceptedOptions[key].type
// @ts-ignore
} but received ${typeof options[key]}`
);
}

if (
// @ts-ignore
acceptedOptions[key].minVersion &&
version &&
// @ts-ignore
lt(version, acceptedOptions[key].minVersion)
) {
invalidArgs.push(
// @ts-ignore
`Invalid option provided for the current version of the binary used. '${key}' was introduced in v${acceptedOptions[key].minVersion}, but received v${version}`
);
}

/* istanbul ignore next: requires incredibly old version of UnRTF to test */
if (
// @ts-ignore
acceptedOptions[key].maxVersion &&
version &&
// @ts-ignore: type checking is done above
gt(version, acceptedOptions[key].maxVersion)
) {
invalidArgs.push(
// @ts-ignore
`Invalid option provided for the current version of the binary used. '${key}' is only present up to v${acceptedOptions[key].maxVersion}, but received v${version}`
);
}
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"module": "NodeNext",
"moduleResolution": "NodeNext",
"outDir": "types",
"resolveJsonModule": true,
"strict": true
"resolveJsonModule": true
},
"include": ["src/index.js"]
}

0 comments on commit ec0f6dc

Please sign in to comment.