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

fix(add-new-hook): use es module import syntax in add-new-hook script #1566

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

czinck
Copy link

@czinck czinck commented Nov 20, 2024

What is the current behavior, and the steps to reproduce the issue?

yarn new-hook useNewHook fails with an error on the require() lines.

What is the expected behavior?

It creates a new directory and files.

How does this PR fix the problem?

It uses the ES module import syntax, instead of cjs. It looks like this file was missed in #1472, which converted everything else to use ES module syntax.

Checklist

  • Have you read contribution guideline?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Is there an existing issue for this PR?
    • link issue here
  • Have the files been linted and formatted?
  • Have the docs been updated to match the changes in the PR?
  • Have the tests been updated to match the changes in the PR?
  • Have you run the tests locally to confirm they pass?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant