From 99d8dacd4cf9aefbe870be54b855f9294472b8e3 Mon Sep 17 00:00:00 2001 From: Raphael LANG Date: Mon, 9 Nov 2020 22:22:47 -0500 Subject: [PATCH 1/2] Docs: Fix JS syntax in working-with-custom-formatters.md code sample Missing parenthesis on ruleUrl causing syntax error in detailed formatter --- docs/developer-guide/working-with-custom-formatters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer-guide/working-with-custom-formatters.md b/docs/developer-guide/working-with-custom-formatters.md index 7efed419335..fe8f8dc19c4 100644 --- a/docs/developer-guide/working-with-custom-formatters.md +++ b/docs/developer-guide/working-with-custom-formatters.md @@ -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 + ":" + From 2bb7668404558a1c6dc924bb4a11bafd7dfdbb23 Mon Sep 17 00:00:00 2001 From: Raphael LANG Date: Wed, 18 Nov 2020 11:51:54 -0500 Subject: [PATCH 2/2] Docs: Fix ruleUrl in working-with-custom-formatters.md code sample ruleUrl needs to get URL from the docs object --- docs/developer-guide/working-with-custom-formatters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer-guide/working-with-custom-formatters.md b/docs/developer-guide/working-with-custom-formatters.md index fe8f8dc19c4..a5e9ade81bf 100644 --- a/docs/developer-guide/working-with-custom-formatters.md +++ b/docs/developer-guide/working-with-custom-formatters.md @@ -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