PHPackages                             silverstripe/documentation-lint - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. silverstripe/documentation-lint

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

silverstripe/documentation-lint
===============================

An abstraction around various documentation linters to make linting documentation easy for commercially supported Silverstripe CMS modules.

1.0.11(9mo ago)184.0k↓27.8%1[3 issues](https://github.com/silverstripe/documentation-lint/issues)20BSD-3-ClauseShellCI passing

Since Apr 4Pushed 9mo ago6 watchersCompare

[ Source](https://github.com/silverstripe/documentation-lint)[ Packagist](https://packagist.org/packages/silverstripe/documentation-lint)[ Docs](https://silverstripe.org)[ RSS](/packages/silverstripe-documentation-lint/feed)WikiDiscussions 1 Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (14)Used By (20)

Documentation lint
==================

[](#documentation-lint)

An abstraction around various documentation linters to make linting markdown documentation easy.

Warning

This repository is intended for use by commercially supported Silverstripe CMS modules. Its linting rules are opinionated and may include rules which are specific to the documentation style and syntax used by those modules.

Installation
------------

[](#installation)

Add this package as a dev dependency

```
composer require --dev silverstripe/documentation-lint
```

You'll also need to allow the `dealerdirect/phpcodesniffer-composer-installer` plugin in the repository (this won't affect downstream users) so that the slevomat PHP linting rules are pulled in correctly.

```
{
    // ...
    "config": {
        "allow-plugins": {
            "dealerdirect/phpcodesniffer-composer-installer": true
        }
    }
}
```

Setup
-----

[](#setup)

### Required software

[](#required-software)

You need `nvm` (or `node` installed with the right version - see `.nvmrc`) and `yarn` installed.

Warning

If you're using a shell other than bash (e.g. zsh) you'll need to set your node version before running the linting script, since your `nvm` installation is probably not set up in a way that it can be used in bash.

You also need `getopt` (enhanced) installed - which you probably do but the script will let you know if you don't.

### Setup in the repository

[](#setup-in-the-repository)

You must add a `.doclintrc` file to the root of the repository which has markdown documentation you want linted. This file must contain a relative path to the directory which holds your documentation, and that path must end with a `/`.

For example:

```
docs/en/

```

Warning

Only the first line of the file will be used.

Usage
-----

[](#usage)

Simply run the command. By default it will assume you're running it from the directory that holds the `.doclintrc` file and that you want to lint markdown, php, and javascript within `.md` files.

```
vendor/bin/doclint
```

To lint for a specific module (e.g. if you have multiple modules installed) you can pass the relative path to the folder containing the `.doclintrc` file.

```
vendor/bin/doclint vendor/silverstripe/developer-docs
```

If you want to specifically only lint one of markdown syntax, PHP codeblocks, or JavaScript codeblocks, use the [appropriate flag(s)](#flags).

```
vendor/bin/doclint -jp
# or
vendor/bin/doclint --with-js --with-php
```

To automatically fix any problems that can be automatically fixed, pass the `--fix` flag.

```
vendor/bin/doclint -f
# or
vendor/bin/doclint --fix
```

### Flags

[](#flags)

The following flags can be used with the `doclint` script:

long nameshort namedescription`--fix``-f`Fix any automatically fixable problems`--with-md``-m`Lint markdown syntax`--with-js``-j`Lint JavaScript code blocks`--with-php``-p`Lint PHP code blocksIf any language flag is passed, only the languages that are passed will be linted (or fixed if `--fix` is passed). If no language flags are passed, all languages will be linted.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community28

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~37 days

Recently: every ~2 days

Total

14

Last Release

292d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b0cba8b534e20e6ab4fff555a97b237a18436ebca1446fc0b29c8a8b504038b9?d=identicon)[GuySartorelli](/maintainers/GuySartorelli)

![](https://www.gravatar.com/avatar/a25bc04c5720a36869d5a39c6449dde7eb43e19b7c8e666d5f632d6a9ab440b1?d=identicon)[emteknetnz](/maintainers/emteknetnz)

![](https://www.gravatar.com/avatar/afbb3dcc9ef29c1a6eedd6addcae5fce9ab1271915a85a4c349301b71237368d?d=identicon)[silverstripe-machine01](/maintainers/silverstripe-machine01)

![](https://avatars.githubusercontent.com/u/1168676?v=4)[Maxime Rainville](/maintainers/maxime-rainville)[@maxime-rainville](https://github.com/maxime-rainville)

---

Top Contributors

[![GuySartorelli](https://avatars.githubusercontent.com/u/36352093?v=4)](https://github.com/GuySartorelli "GuySartorelli (22 commits)")[![emteknetnz](https://avatars.githubusercontent.com/u/4809037?v=4)](https://github.com/emteknetnz "emteknetnz (12 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (10 commits)")

### Embed Badge

![Health badge](/badges/silverstripe-documentation-lint/health.svg)

```
[![Health](https://phpackages.com/badges/silverstripe-documentation-lint/health.svg)](https://phpackages.com/packages/silverstripe-documentation-lint)
```

###  Alternatives

[worksome/coding-style

Worksomes coding style

49771.7k57](/packages/worksome-coding-style)[laminas/laminas-coding-standard

Laminas Coding Standard

331.7M534](/packages/laminas-laminas-coding-standard)[nette/coding-standard

41930.0k15](/packages/nette-coding-standard)[shopsys/coding-standards

Coding standards definition compatible with PSR-2

20269.1k13](/packages/shopsys-coding-standards)[mrm-commerce/magento-coding-standard-phpcs

MRM Commerce PHP Code Sniffer Coding Standard designed for Magento 2 applications

4751.2k](/packages/mrm-commerce-magento-coding-standard-phpcs)[genealabs/php-coding-standards

1654.8k1](/packages/genealabs-php-coding-standards)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
