We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1874ddd commit 7d85505Copy full SHA for 7d85505
src/reporter.js
@@ -3,16 +3,24 @@ import request from "browser-request";
3
const url = "http://beta.accesslint.com/api/v1/reports";
4
5
export default function (message) {
6
- let violations = message.violations;
+ const violations = message.violations;
7
8
if (violations.length > 0) {
9
+ let descriptions = [];
10
+
11
+ violations.map((violation) => {
12
+ descriptions.push(violation.help);
13
+ });
14
15
request({
16
method: "POST",
17
url: url,
18
json: message,
19
}, function() {});
20
- console.error(message);
- throw new Error(`AccessLintError: ${violations.length} violations.`);
21
+ throw new Error(
22
+ `AccessLintError: ${violations.length} violations:` + "\n" +
23
+ descriptions.join(",\n")
24
+ );
25
}
26
0 commit comments