stylebook

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

README

GitHub Actions Codecov Renovate
PyPI TestPyPI NPM
Python Node Go

Stylebook

The Stylebook logo.

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

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

CLI screenshot

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.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL