Skip to content

A collection of lefthook linting scripts for various development tools.

License

Notifications You must be signed in to change notification settings

boozt-platform/lefthook

Repository files navigation

GitHub Tag (latest SemVer) license

lefthook

Various organizational hooks based on the lefthook for development and continuous integration. Hooks enforce consistent practices across all commits and deployments.

Table of Contents

How to Use It

Create a new file .lefthook.yaml in your project's root folder and use the example content below:

# .lefthook.yaml
---
remotes:
  - git_url: https://github.com/boozt-platform/lefthook.git
    ref: v1.3.0
    configs:
      # lint commit messages based by the conventional commits
      - hooks/commitlint/.lefthook.yaml
      # lint Dockerfiles
      - hooks/hadolint/.lefthook.yaml
      # lint shell scripts
      - hooks/shellcheck/.lefthook.yaml
      # check if the license headers are present in the files
      - hooks/license-checker/.lefthook.yaml
      # lint the markdown (.md) files
      - hooks/markdown-lint/.lefthook.yaml
      # A linter for YAML files.
      - hooks/yamllint/.lefthook.yaml
      # validate the JSON files
      - hooks/jsonlint/.lefthook.yaml

Run lefthook install (follow the installation guide if the lefthook command is not present on the system).

Available Hooks

  • commitlint (commit-msg) - Lint commit messages based by the conventional commits
  • hadolint (pre-commit) - A smarter Dockerfile linter
  • shellcheck (pre-commit) - a static analysis tool for shell scripts
  • license-checker (pre-commit) - Checks if the license headers are present in the Git staged files with possibility to exclude certain files or file extensions using Regular Expression pattern.
  • jsonlint (pre-commit) - Validation tool for JSON files.
  • yamllint (pre-commit) - A linter for YAML files.
  • markdown-lint (pre-commit) - is a static analysis tool for *.md files.

About Boozt

Boozt is a leading and fast-growing Nordic technology company selling fashion and lifestyle online mainly through its multi-brand webstore Boozt.com and Booztlet.com.

The company is focused on using cutting-edge, in-house developed technology to curate the best possible customer experience.

With offices in Sweden, Denmark, Lithuania and Poland, we pride ourselves in having a diverse team, consisting of 1100+ employees and 38 nationalities.

See our Medium blog page for technology-focused articles. Would you like to make your mark by working with us at Boozt? Take a look at our latest hiring opportunities.

Reporting Issues

Please provide a clear and concise description of the problem or the feature you're missing along with any relevant context or screenshots.

Check existing issues before reporting to avoid duplicates.

Please follow the Issue Reporting Guidelines before opening a new issue.

Contributing

Contributions are highly valued and very welcome! For the process of reviewing changes, we use Pull Requests. For a detailed information please follow the Contribution Guidelines

License

license

This project is licensed under the MIT. Please see LICENSE for full details.