mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-06 07:29:30 +02:00
[Dev] Turned on checkJs
in TSConfig; fixed script type errors (#6115)
This commit is contained in:
parent
7cb2c560ab
commit
29d9bb6e7b
@ -177,9 +177,10 @@
|
||||
}
|
||||
},
|
||||
|
||||
// Overrides to prevent unused import removal inside `overrides.ts` and enums files (for TSDoc linkcodes)
|
||||
// Overrides to prevent unused import removal inside `overrides.ts` and enums files (for TSDoc linkcodes),
|
||||
// as well as in all TS files in `scripts/` (which are assumed to be boilerplate templates).
|
||||
{
|
||||
"includes": ["**/src/overrides.ts", "**/src/enums/**/*"],
|
||||
"includes": ["**/src/overrides.ts", "**/src/enums/**/*", "**/scripts/**/*.ts"],
|
||||
"linter": {
|
||||
"rules": {
|
||||
"correctness": {
|
||||
@ -189,7 +190,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"includes": ["**/src/overrides.ts"],
|
||||
"includes": ["**/src/overrides.ts", "**/scripts/**/*.ts"],
|
||||
"linter": {
|
||||
"rules": {
|
||||
"style": {
|
||||
|
@ -44,20 +44,22 @@ function getTestFolderPath(...folders) {
|
||||
* @returns {Promise<{selectedOption: {label: string, dir: string}}>} the selected type
|
||||
*/
|
||||
async function promptTestType() {
|
||||
const typeAnswer = await inquirer.prompt([
|
||||
{
|
||||
type: "list",
|
||||
name: "selectedOption",
|
||||
message: "What type of test would you like to create?",
|
||||
choices: [...choices.map(choice => ({ name: choice.label, value: choice })), "EXIT"],
|
||||
},
|
||||
]);
|
||||
const typeAnswer = await inquirer
|
||||
.prompt([
|
||||
{
|
||||
type: "list",
|
||||
name: "selectedOption",
|
||||
message: "What type of test would you like to create?",
|
||||
choices: [...choices.map(choice => ({ name: choice.label, value: choice })), { name: "EXIT", value: "N/A" }],
|
||||
},
|
||||
])
|
||||
.then(ans => ans.selectedOption);
|
||||
|
||||
if (typeAnswer.selectedOption === "EXIT") {
|
||||
if (typeAnswer.name === "EXIT") {
|
||||
console.log("Exiting...");
|
||||
return process.exit();
|
||||
return process.exit(0);
|
||||
}
|
||||
if (!choices.some(choice => choice.dir === typeAnswer.selectedOption.dir)) {
|
||||
if (!choices.some(choice => choice.dir === typeAnswer.dir)) {
|
||||
console.error(`Please provide a valid type: (${choices.map(choice => choice.label).join(", ")})!`);
|
||||
return await promptTestType();
|
||||
}
|
||||
|
@ -18,6 +18,7 @@
|
||||
"esModuleInterop": true,
|
||||
"strictNullChecks": true,
|
||||
"sourceMap": false,
|
||||
"checkJs": true,
|
||||
"strict": false, // TODO: Enable this eventually
|
||||
"rootDir": ".",
|
||||
"baseUrl": "./src",
|
||||
|
Loading…
Reference in New Issue
Block a user