# lint-readme-code

> lint code in your readme.md

Latest version **0.1.1** (published 2026-10-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install lint-readme-code
pnpm add lint-readme-code
yarn add lint-readme-code
bun add lint-readme-code
```

Provides the command `lrc`.

## Health

**Score 50/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated.

Warnings: low downloads; no types; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2026-10-06 |
| First published | 2016-01-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 3 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Hemanth.HM |
| Maintainers | hemanth |
| Keywords | cli-app, cli, lint, readme, code, validate |

## Links

- npm: https://www.npmjs.com/package/lint-readme-code
- Repository: https://github.com/hemanth/lint-readme-code
- Homepage: https://github.com/hemanth/lint-readme-code#readme
- Issues: https://github.com/hemanth/lint-readme-code/issues
- npm.io page: https://npm.io/package/lint-readme-code

## Dependencies (3)

- [xo](https://npm.io/package/xo.md) ^0.39.1
- [meow](https://npm.io/package/meow.md) ^14.1.0
- [gfm-code-blocks](https://npm.io/package/gfm-code-blocks.md) ^1.0.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2026-10-06
- 0.1.0 — 2016-01-12

## README

# lint-readme-code [![Build Status](https://travis-ci.org/hemanth/lint-readme-code.svg?branch=master)](https://travis-ci.org/hemanth/lint-readme-code)

> lint code in your readme.md

The idea is to extract the code blocks from your `readme.md` file and run the required lint and report the errors on it!

## Install

```
$ npm install --save lint-readme-code
```


## Usage

```js
const lintReadmeCode = require('lint-readme-code');

lintReadmeCode()
.then(report => console.log('lint report'))
.catch(err => console.error(err))
```

## API

### lintReadmeCode([readmePath])

#### readmePath

Type: `string`
Default: `./readme.md`

Path to your `readme.md`

## CLI

```
$ npm install --global lint-readme-code
```

```
$ lrc --help

  Usage
    lrc [input]
```

## Example

```
$ lrc readme.md
"report" is defined but never used at line #4 for .then(report => console.log('lint report'))
Newline required at end of file but not found. at line #5 for .catch(err => console.error(err))
Missing semicolon. at line #5 for .catch(err => console.error(err))
```

## TODO

* Support more langs as of now it supports only JavaScript.

* Better CLI ouput? [maybe bit of colors?]

## License

MIT © [Hemanth.HM](http://h3manth.com)

---
_Source: https://npm.io/package/lint-readme-code · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
