Skip to content

Commit

Permalink
Link to ESLint rule documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
j-f1 authored and sonicdoe committed Jul 31, 2017
1 parent be7b9e9 commit 77d728d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/utils/linter.js
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 77d728d

Please sign in to comment.