diff --git a/.husky/pre-commit b/.husky/pre-commit index 0350c897..f6c0afba 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,9 +1,11 @@ #!/usr/bin/env sh +. "$(dirname "$0")/_/husky.sh" + # This is the code that automatically runs the Prettier formatter on all staged parts of files that are to be committed. It is run after a commit has been triggered, but before the commit is actually made. This ensures that all code that is committed is formatted correctly. # Source: https://prettier.io/docs/en/precommit.html#option-4-git-format-stagedhttpsgithubcomhallettjgit-format-staged -npx git-format-staged -f 'prettier --ignore-unknown --stdin --stdin-filepath \"{}\"' . +npx git-format-staged -f 'prettier --ignore-unknown --stdin-filepath "{}"' '*.*' # If you have issues when running the npx command in an IDE, you should try running the command in the terminal instead. This issue is due to the PATH values not being set as expected in the IDE in order for npx to be recognized. See https://stackoverflow.com/questions/67115897/vscode-github-desktop-pre-commit-hook-npx-command-not-found for more information. diff --git a/README.md b/README.md index c58d39a5..ac07a84d 100755 --- a/README.md +++ b/README.md @@ -157,7 +157,7 @@ If you are trying to contribute to the Enable site from a forked version of this ### I Made a New Component! How do I make sure it is available on NPM -You will need to update the version number that NPM broadcasts as the latest version number. Please use [np](https://github.com/sindresorhus/np) to do this (it is what we have used in the past). This should be done by development lead of the Enable project (as of this writing, this is [Zoltan Hawryluk](https://www.npmjs.com/~zoltandulac)). +You will need to update the version number that NPM broadcasts as the latest version number. Please use [np](https://github.com/sindresorhus/np) to do this (it is what we have used in the past). This should be done by development lead of the Enable project (as of this writing, this is [Zoltan Hawryluk](https://www.npmjs.com/~zoltandulac)). ## References