Skip to content

Commit

Permalink
Docs: Fix JS syntax and doc URL in working-with-custom-formatters.md (#…
Browse files Browse the repository at this point in the history
…13828)

* Docs: Fix JS syntax in working-with-custom-formatters.md code sample

Missing parenthesis on ruleUrl causing syntax error in detailed formatter

* Docs: Fix ruleUrl in working-with-custom-formatters.md code sample

ruleUrl needs to get URL from the docs object
  • Loading branch information
nostalic committed Nov 18, 2020
1 parent 038dc73 commit 042ae44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/developer-guide/working-with-custom-formatters.md
Expand Up @@ -195,7 +195,7 @@ module.exports = function(results, data) {
var logMessage = {
filePath: current.filePath,
ruleId: msg.ruleId,
ruleUrl: data.rulesMeta[msg.ruleId].url,
ruleUrl: data.rulesMeta[msg.ruleId].docs.url,
message: msg.message,
line: msg.line,
column: msg.column
Expand Down Expand Up @@ -226,7 +226,7 @@ module.exports = function(results, data) {
"\n" +
msg.type +
" " +
msg.ruleId + (msg.ruleUrl ? " (" + msg.ruleUrl + ")" : ""
msg.ruleId + (msg.ruleUrl ? " (" + msg.ruleUrl + ")" : "") +
"\n " +
msg.filePath +
":" +
Expand Down

0 comments on commit 042ae44

Please sign in to comment.