0.4.0 • Published 8 years ago

indent-checker v0.4.0

Weekly downloads
31
License
MIT
Repository
github
Last release
8 years ago

Build Status Coverage Status Dependency Status Code Quality

indent-checker

Simple library to test if file indentation rules are being met

Version

This documentation refers to indent-checker verions 0.2.2

Synopsis

var indent = require('indent-checker');
var text   = "\t\tSome text\n   Other line\n";

if (! indent.textOk(text)) {
    console.error('Text badly indented!');
}

if (indent.fileOk('some-file.json')) {
    console.log('some-file.json is well indented!');
}

Description

indent-checker is a library to check that text/files follow indentation rules. The default rule is that no line should mix indentation syles eg have both tabs and spaces on a line.

Configuration

  • type - the type of indentation to be supported
    • tabs - only allow indentation with tabs
    • spaces - only allow space indentation
    • undenfied or false - only allow one type of indentation in a file (no mixed indentation)
  • jsdoc - allow the common style of documentation where multi line documentation is a single space indented
	/**
	 * With space indentation this style wont fail.
	 */
0.4.0

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago