Closed sethlopez-dynamit closed 5 years ago
I agree that the pre-commit hook it probably too strict to enforce. I'd like the project to be more generally consumable, although I think adding a default .prettierrc like we've done is fine.
If we want to ensure linting is followed as the project evolves, I think adding CI somewhere here to prevent merges until linting passed is a good move.
Adding a CircleCI integration is a free way to get there https://github.com/marketplace/circleci
I believe that travis is already configured to run on PRs. I'm not sure who set that up but we'll want access. I think this is best handled at the CI level. I'll create a PR that removes Husky.
Expected behavior
Starting with a default fabricator instance, I should be able to create a git repository in the fabricator directory and commit the fabricator files successfully.
Current behavior
Starting with a default fabricator instance, when attempting to commit the fabricator files to a git repository that's been created in the fabricator directory, the husky pre-commit hook fails with the error below.
As you can see from the error, the pre-commit hook command is malformed.
Possible solution
One solution would be to fix the invalid pre-commit hook value by either concatenating both commands in the hook into a single string.
Another possible solution is to remove the pre-commit hook altogether. I propose this solution because not everyone wants to lint and fix before committing their changes to their repo. Removing the pre-commit hook would save others from having to remove it themselves. Additionally, if someone wants this in their project, they can add it themselves.
Details
Fabricator: 2.0.0 Node: 10.14.1 npm: 6.4.1 OS: Mac OS 10.14 "Mojave"