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.
| Runner | File type | Linter | Config file |
|---|---|---|---|
| Go | CSV |
csvlint
with RFC 4180 |
|
| Dockerfile |
Hadolint
with Docker Build Best Practices |
.hadolint.yaml |
|
| Go Module | gomoddirectives | ||
| LaTeX | ChkTeX | .chktexrc |
|
| Makefile | checkmake | .checkmake.ini |
|
| Properties | propertieslint | .propertieslint.json |
|
| Protobuf |
protolint
with Protobuf Style Guide |
.buf.yaml |
|
| Shell | ShellCheck | .shellcheckrc |
|
| Terraform |
TFLint
with Terraform Style Guide |
.tflint.hcl |
|
| XML | libxml2 | ||
| Python | Batch | Blinter | blinter.ini |
| Dotenv | dotenv-linter | ||
| INI | PyINILint | ||
| SQL |
SQLFluff
with Mozilla SQL Style Guide |
.sqlfluff |
|
| TOML |
Taplo
with TOML Quick Tour |
.taplo.toml |
|
| YAML |
yamllint
with YAML Best Practices |
.yamllintrc.yaml |
|
| reStructuredText | restructuredtext-lint | ||
| Node | CSS |
Stylelint
with Mozilla CSS Coding Guide |
Stylelint Configuration |
| HTML |
HTMLHint
with Mozilla HTML Style Guide |
.htmlhintrc |
|
| JSON | JSON Lint | .jsonlintrc.json |
|
| Lockfile | lockfile-lint | ||
| Markdown |
markdownlint
with Adobe Markdown Basics |
.markdownlint.json |
|
| Mermaid | Maid |
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.
Release files for stylebook 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| stylebook-0.2.0.tar.gz | 8.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stylebook-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.6 kB
Release files / stylebook-0.2.0.tar.gz
| Download URL | stylebook-0.2.0.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b530129595350efd1e0ebb850454e835dadf51520a34f4b086f3ad3e4a4d502b
|
|
BLAKE2b-256 checksum How to use checksums |
34a779ddb589f2791c24afec1756e6124fe64662f63b124359e7d0166752c54a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / stylebook-0.2.0-py3-none-any.whl
| Download URL | stylebook-0.2.0-py3-none-any.whl |
|---|---|
| Size | 13.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d2081b220cdfae8f5d4cb1417f5a695f19c57275c80703c19cfbdb88f4fb490
|
|
BLAKE2b-256 checksum How to use checksums |
0e46b29e171cb4403d94713fa457b79ac51746049c54d1e1fe095caeba43efff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|