Skip to content

Commit a930893

Browse files
committed
fixup! rename + type
1 parent a07e68a commit a930893

File tree

1 file changed

+5
-5
lines changed
  • packages/cloudflare/src/cli/build/patches/ast

1 file changed

+5
-5
lines changed

packages/cloudflare/src/cli/build/patches/ast/util.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ export type RuleConfig = NapiConfig & { fix?: string };
2020
* @returns A list of edits.
2121
*/
2222
export function getRuleEdits(rule: string | RuleConfig, root: SgNode, { once = false } = {}) {
23-
const napiConfig: NapiConfig & { fix?: string } = typeof rule === "string" ? yaml.parse(rule) : rule;
24-
if (napiConfig.transform) {
23+
const ruleConfig: RuleConfig = typeof rule === "string" ? yaml.parse(rule) : rule;
24+
if (ruleConfig.transform) {
2525
throw new Error("transform is not supported");
2626
}
27-
if (!napiConfig.fix) {
27+
if (!ruleConfig.fix) {
2828
throw new Error("no fix to apply");
2929
}
3030

31-
const fix = napiConfig.fix;
31+
const fix = ruleConfig.fix;
3232

33-
const matches = once ? [root.find(napiConfig)].filter((m) => m !== null) : root.findAll(napiConfig);
33+
const matches = once ? [root.find(ruleConfig)].filter((m) => m !== null) : root.findAll(ruleConfig);
3434

3535
const edits: Edit[] = [];
3636

0 commit comments

Comments
 (0)