tldr-lint
is a linting tool for validating tldr pages.
It can also format your pages for you!
tldr-lint
and its alias tldrl
can be installed via npm
:
npm install --global tldr-lint
It's really simple.
Usage: tldr-lint [options] <file|dir>
Options:
-V, --version output the version number
-f, --format also attempt formatting (to stdout, or as specified by -o)
-o, --output <file> output to formatted file
-i, --in-place formats in place
-v, --verbose print verbose output
-h, --help output usage information
All of the errors can be found in lib/tldr-lint.js
.
Error Code | Description |
---|---|
TLDR001 | File should contain no leading whitespace |
TLDR002 | A single space should precede a sentence |
TLDR003 | Descriptions should start with a capital letter |
TLDR004 | Command descriptions should end in a period |
TLDR005 | Example descriptions should end in a colon with no trailing characters |
TLDR006 | Command name and description should be separated by an empty line |
TLDR007 | Example descriptions should be surrounded by empty lines |
TLDR008 | File should contain no trailing whitespace |
TLDR009 | Page should contain a newline at end of file |
TLDR010 | Only Unix-style line endings allowed |
TLDR011 | Page never contains more than a single empty line |
TLDR012 | Page should contain no tabs |
TLDR013 | Title should be alphanumeric with dashes, underscores or spaces |
TLDR014 | Page should contain no trailing whitespace |
TLDR015 | Example descriptions should start with a capital letter |
TLDR016 | Label for information link should be spelled exactly More information: |
TLDR017 | Information link should be surrounded with angle brackets |
TLDR018 | Page should only include a single information link |
TLDR019 | Page should only include a maximum of 8 examples |
TLDR101 | Command description probably not properly annotated |
TLDR102 | Example description probably not properly annotated |
TLDR103 | Command example is missing its closing backtick |
TLDR104 | Example descriptions should prefer infinitive tense (e.g. write) over present (e.g. writes) or gerund (e.g. writing) |
TLDR105 | There should be only one command per example |
TLDR106 | Page title should start with a hash (# ) |
TLDR107 | File name should end with .md extension |
TLDR108 | File name should not contain whitespace |
TLDR109 | File name should be lowercase |