diff --git a/lib/utils/linter.js b/lib/utils/linter.js index 8e71444..1531f49 100644 --- a/lib/utils/linter.js +++ b/lib/utils/linter.js @@ -1,3 +1,5 @@ +const getRuleURI = require('eslint-rule-documentation') + function getRange (line, col, src, lineStart) { line = typeof line !== 'undefined' ? parseInt((line - 1) + lineStart, 10) : 0 col = typeof col !== 'undefined' ? parseInt(col - 1, 10) : 0 @@ -23,6 +25,7 @@ module.exports = function (err, output) { occurrences.push({ severity: msg.fatal ? 'error' : 'warning', + url: getRuleURI(msg.ruleId).url, excerpt: msg.message, location: { file: self.filePath, diff --git a/package.json b/package.json index 33715f8..e32e16e 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "dependencies": { "atom-package-deps": "^4.6.0", "babel-eslint": "^7.1.0", + "eslint-rule-documentation": "^1.0.9", "esprima": "^3.1.1", "happiness": "^10.0.2", "loophole": "^1.1.0",