


Stylebook

Linter aggregator for various data formats. All rules are preconfigured with
common rules like duplicate blank lines, trailing whitespace and consistent
indentation. In Markdown, it has third-party rules to check dead links and
broken images.
View all rules
Download
Several linters must be installed separatedly, preferably at OS level:
- ChkTeX
- Hadolint
- ShellCheck
- libxml2
Go
Most linters are brought in as dependencies, but others need to be installed to
get the binaries.
go install github.com/hanggrian/stylebook@latest
go install github.com/checkmake/checkmake/cmd/checkmake@latest
go install github.com/terraform-linters/tflint@latest
PyPI
PyPI transitively brings linter dependencies.
pip install stylebook
NPM
Most linters are brought in as dependencies, except for Stylelint, which needs
to be installed in the root package.json.
npm i @hanggrian/stylebook \
stylelint @stylistic/stylelint-plugin stylelint-config-recommended --save-dev
Usage

Insert target paths into the command. The program will recursively search for
qualifying file types and spawn the corresponding linter processes.
stylebook . # Go binary
npx @hanggrian/stylebook some-folder/ some-file.sql
source .venv/bin/activate && stylebook **/*
Configuration
Configuration files are automatically picked up. If the file doesn't exist, the
program will use default configuration. If .stylebookrc exists in the root
project directory, it will be used as exclusion list.