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
html hint tool, focused on semantic code style.
Install
npm i -g htmlcsUsage
in CLI
htmlcs <file>
in Node.js
hint file
var htmlcs = require('htmlcs'); var result = htmlcs.hintFile(filePath);
hint code (string)
var htmlcs = require('htmlcs'); var result = htmlcs.hint(code);
use hint result
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 ); });
format file
var htmlcs = require('htmlcs'); console.log(htmlcs.formatFile(filePath))
format code (string)
var htmlcs = require('htmlcs'); console.log(htmlcs.format(code))
Rules & Codes
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.
