Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hoist-regex #16

Closed
3 tasks done
antfu opened this issue May 13, 2024 · 0 comments
Closed
3 tasks done

Hoist-regex #16

antfu opened this issue May 13, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@antfu
Copy link
Owner

antfu commented May 13, 2024

Clear and concise description of the problem

function foo(file) {
  /// hoist-regex customName
  return file.test(/some-regex/)
}

to

const customName = /some-regex/
function foo(file) {
  return file.test(customName)
}

Suggested solution

Alternative

Later we could support a bunch of other hoist-x commands

Additional context

No response

Validations

@antfu antfu added the enhancement New feature or request label May 13, 2024
@antfu antfu closed this as completed in 217b398 May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant