Skip to content

Commit 01930e9

Browse files
committed
Fix imports
1 parent 1eca852 commit 01930e9

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

scripts/create-rule.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,11 @@
55
import { resolve } from "path";
66
import { existsSync, writeFileSync } from "fs";
77
import { exec } from "child_process";
8-
// @ts-ignore: yargs has no default export
98
import yargs from "yargs/yargs";
10-
// @ts-ignore: yargs/helpers has no default export
119
import { hideBin } from "yargs/helpers";
12-
// Use require for boilerplate generators (CommonJS)
13-
// @ts-ignore
14-
const ruleBoilerplateGenerator = require("./boilerplate/rule");
15-
// @ts-ignore
16-
const testBoilerplateGenerator = require("./boilerplate/test");
17-
// @ts-ignore
18-
const docBoilerplateGenerator = require("./boilerplate/doc");
10+
import {ruleBoilerplateGenerator} from "./boilerplate/rule";
11+
import {testBoilerplateGenerator} from "./boilerplate/test";
12+
import {docBoilerplateGenerator} from "./boilerplate/doc";
1913

2014
// Define the yargs configuration
2115
const argv = yargs(hideBin(process.argv))
@@ -24,13 +18,13 @@ const argv = yargs(hideBin(process.argv))
2418
alias: "a",
2519
type: "string",
2620
describe: "Author of the rule",
27-
default: "$AUTHOR"
21+
default: "$AUTHOR" // Provide default value
2822
},
2923
description: {
3024
alias: "d",
3125
type: "string",
3226
describe: "Description of the rule",
33-
default: "$DESCRIPTION"
27+
default: "$DESCRIPTION" // Provide default value
3428
}
3529
})
3630
.demandCommand(1, "You must provide the rule name.").argv as any; // Type assertion for yargs

0 commit comments

Comments
 (0)