From 4d098daefcb63a293657e9d94a0fa08244c3f8c5 Mon Sep 17 00:00:00 2001 From: Vida Xie Date: Thu, 16 May 2024 02:25:36 +0800 Subject: [PATCH] fix(to-destructuring): fix incorrect regexp (#18) --- src/commands/to-destructuring.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/to-destructuring.ts b/src/commands/to-destructuring.ts index 7855290..37e11cc 100644 --- a/src/commands/to-destructuring.ts +++ b/src/commands/to-destructuring.ts @@ -2,7 +2,7 @@ import type { Command } from '../types' export const toDestructuring: Command = { name: 'to-destructuring', - match: /^\s*[\/:@]\s*(?:to-|2)?(?:destructuring|dest)?$/i, + match: /^\s*[\/:@]\s*(?:to-|2)(?:destructuring|dest)$/i, action(ctx) { const node = ctx.findNodeBelow( 'VariableDeclaration',