Skip to content

Add a pre-commit hook to lint posts that are being modified#340

Open
mgriffin-scottlogic wants to merge 6 commits into
ScottLogic:gh-pagesfrom
mgriffin-scottlogic:gh-pages
Open

Add a pre-commit hook to lint posts that are being modified#340
mgriffin-scottlogic wants to merge 6 commits into
ScottLogic:gh-pagesfrom
mgriffin-scottlogic:gh-pages

Conversation

@mgriffin-scottlogic
Copy link
Copy Markdown
Contributor

  • Makes use of Husky to run linting on posts that are about to be committed.
  • Refactored the existing lint script so that we can share the individual post linting code.
  • Explicitly disable Husky via environment variable when running CI builds.

Attempting to commit with an invalid file looks like:

image

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant