Reporters are small modules that can be used to perform actions with the lint results, for example printing something to the terminal or generate custom reports.
- If nothing is passed, a simple, default reporter will be used. This will just print all the warnings/errors found.
- Pass the name of a Node module. If
lesshint
is installed globally only globally installed reporters are available (the normal Node module loading rules apply). - Pass a absolute or relative path to a custom reporter anywhere on the disk. Relative paths will be resolved against
process.cwd()
.
These steps always apply, no matter whether you're using the CLI or calling lesshint
from code.
lesshint --reporter my-super-awesome-reporter file.less
lesshint --reporter /path/to/my/super/awesome/reporter.js file.less