Closed askb closed 4 years ago
Does this solve a need? What is this for?
Hi @RichardLitt this file allows folks to use pre-commit (https://pre-commit.com/) to automatically install and run write-good as a git hook and be part of their regular git workflow. The hook after installed will report linting issues automatically when they run git commit
in their projects where the hook is installed.
This is handy if you want to allow folks using pre-commit to be able to install write-good as a hook directly and officially from the write-good project. This file should simply exist and does not affect the write-good project other than making it more convenient for folks who want to install the hook.
@zxiiro thanks for following up on this, @RichardLitt can we get a review on this please.
Does this file need to be checked into both git and the npm package?
This only needs to exist in the Git repo. pre-commit installs hooks directly from Git so you do not need to include it in the npm package.
I should mention that you may want to adjust the "files" parameter after merging this PR to include all of the file extensions you want to support.
Thanks, @zxiiro. Can we add the filename to an .npmignore file, then? As well, I don't know what that file extensions parameter should be. @askb Can you do this work?
As well, I don't know what that file extensions parameter should be.
Basically the files list is a list of file extensions you want write-good to automatically scan for if someone were to install write-good as a pre-commit hook in their project. It's mainly convenience really because folks using this hook can override the "files" parameter in their project.
The current list looks like it covers common Markdown and ReStructured file extensions so it means this hook will automatically run write-good against those files in projects that install the pre-commit hook.
you want write-good to automatically scan for
I wouldn't be using this functionality. The list of extensions should be up to the contributors who would be. If it needs to be in this PR, it's their responsibility to add them. If the current list works, good.
you want write-good to automatically scan for
I wouldn't be using this functionality. The list of extensions should be up to the contributors who would be. If it needs to be in this PR, it's their responsibility to add them. If the current list works, good.
Works for me, let's wait for @askb to update this patch. Thanks!
@RichardLitt @zxiiro I've included the .npmignore file as requested. Let me know if anything else needs to be done.
Looks good to me. Patched. Thanks!
Signed-off-by: Anil Belur abelur@linuxfoundation.org