File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
packages/cloudflare/src/cli/build/patches/ast Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -20,17 +20,17 @@ export type RuleConfig = NapiConfig & { fix?: string };
2020 * @returns A list of edits.
2121 */
2222export 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
You can’t perform that action at this time.
0 commit comments