JSPM

  • Created
  • Published
  • Downloads 404
  • Score
    100M100P100Q86937F
  • License MIT

html hint tool, focused on semantic code style.

Package Exports

  • htmlcs
  • htmlcs/lib/config

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (htmlcs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

htmlcs

Build Status NPM version Coverage Status Dependencies DevDependencies

html hint tool, focused on semantic code style.

Install

npm i -g htmlcs

Usage

  • in CLI

    htmlcs <file>
  • in Node.js

    var htmlcs = require('htmlcs');
    
    var result = htmlcs.hintFile(filePath);
    
    result.forEach(function(item){
        console.log(
            '[%s] line %d, col %d: %s (%s, %s)',
            item.type,
            item.pos.line,
            item.pos.col,
            item.message,
            item.rule,
            item.code
        );
    });

Rules & Codes

lib/rules/

rule map

Config

  • default: lib/default/.htmlcsrc

  • custom:

    Custom rule file (.htmlcsrc) can be placed in the same/parent directory of target file, or the ~/ directory.

    If found in neither paths, the default config will be used.