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 2411723 commit 91a11f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
12 changes: 2 additions & 10 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,45 +36,37 @@ 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;
}
// Arg will be empty for some non-standard options
// @ts-ignore

if (acceptedOptions[key].arg !== "") {
// @ts-ignore
args.push(acceptedOptions[key].arg);
}

// @ts-ignore
if (typeof options[key] !== "boolean") {
// @ts-ignore
args.push(options[key]);
}
} 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: type checking is done above
lt(version, acceptedOptions[key].minVersion, { loose: true })
) {
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}`
);
}
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 91a11f5

Please sign in to comment.