Socket
Book a DemoInstallSign in
Socket

lint-readme-code

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lint-readme-code

lint code in your readme.md

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

lint-readme-code Build Status

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

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

Keywords

cli-app

FAQs

Package last updated on 12 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts