Skip to content

Commit d9c0d32

Browse files
committed
Use console.error instead of throw
- We want the script to continue. - Console.error supports logging objects. - Poltergeist will still fail with this implementation.
1 parent c0443e4 commit d9c0d32

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/reporter.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,15 @@ export default function (message) {
66
const violations = message.violations;
77

88
if (violations.length > 0) {
9-
let descriptions = [];
10-
11-
violations.map((violation) => {
12-
descriptions.push(violation.help);
13-
});
14-
159
request({
1610
method: "POST",
1711
url: url,
1812
json: message,
1913
}, function() {});
2014

21-
throw new Error(
22-
`AccessLintError: ${violations.length} violations:` + "\n" +
23-
descriptions.join(",\n")
15+
console.error(
16+
`AccessLint - ${violations.length} accessibility violations:`,
17+
violations
2418
);
2519
}
2620
}

0 commit comments

Comments
 (0)