1.0.3 • Published 10 years ago
eslint-tool-summarize v1.0.3
eslint-tool-summarize
Description
Generate a summary of the ESLint Rules used in a .eslintrc
configuration file.
Install
$ npm install eslint-tool-summarize -g
Usage
Command Line
Make sure the module is installed globally.
$ eslint-tool-summarize -c ./.eslintrc -o ./output.html
$ eslint-summarize -c ./.eslintrc -o ./output.html
Module
var summarize = require('eslint-tool-summarize');
summarize.load('./.eslintrc', function (err, templateContext) {
summarize.generate('./some-template.html', templateContext, function (err, output) {
console.log(output);
});
});
Custom Templates - TemplateContext
{
config: "",
categories: [
{
name: "",
description: "",
rules: [
{
used: rule.value[0] || rule.value,
value: [2, 1],
name: "",
link: eslintRulesPage + rule.name + ".html",
description: ""
},
...
]
},
...
]
}