Skip to content

Commit

Permalink
Use full path reporter for lesshint
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Apr 29, 2016
1 parent c66a226 commit 90fe433
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"lint": "npm run srclint && npm run demolint && npm run lesshint",
"srclint": "RUN_ENV=SRC eslint components test site scripts ./*.js --ext '.js,.jsx'",
"demolint": "RUN_ENV=DEMO eslint components/*/demo/*.md --ext '.md'",
"lesshint": "lesshint components",
"lesshint": "lesshint components -r scripts/lesshint-report.js",
"eslint-fix": "eslint --fix components test site scripts ./*.js --ext '.js,.jsx' && eslint-tinker ./components/*/demo/*.md",
"test": "npm run lint && npm run dist && npm run jest",
"jest": "jest",
Expand Down
12 changes: 12 additions & 0 deletions scripts/lesshint-report.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* eslint-disable */
var originReport = require('lesshint/lib/reporters/stylish').report;

module.exports = {
report: function (errors) {
// Use full path
errors.forEach(function(error) {
error.file = error.fullPath;
});
originReport(errors);
}
};

0 comments on commit 90fe433

Please sign in to comment.