Skip to main content

Comprehensive linter aggregator for data and tooling formats

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stylebook-0.2.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stylebook-0.2.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file stylebook-0.2.0.tar.gz.

File metadata

  • Download URL: stylebook-0.2.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for stylebook-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b530129595350efd1e0ebb850454e835dadf51520a34f4b086f3ad3e4a4d502b
MD5 a7a12d53091a7bea5df4ff24d981ea07
BLAKE2b-256 34a779ddb589f2791c24afec1756e6124fe64662f63b124359e7d0166752c54a

See more details on using hashes here.

File details

Details for the file stylebook-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: stylebook-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for stylebook-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d2081b220cdfae8f5d4cb1417f5a695f19c57275c80703c19cfbdb88f4fb490
MD5 f1e5f6f12277e25d476f5aa5de7949ad
BLAKE2b-256 0e46b29e171cb4403d94713fa457b79ac51746049c54d1e1fe095caeba43efff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page