dequelabs / axe-cli

[Deprecated] A command-line interface for the aXe accessibility testing engine
Mozilla Public License 2.0
430 stars 35 forks source link

chore: add ESLint and Prettier #73

Closed stephenmathieson closed 6 years ago

stephenmathieson commented 6 years ago

This patch introduces ESLint and styles all code with Prettier. I've configured Prettier to match the existing code-style as much as possible.

Reviewer checks

Required fields, to be filled out by PR reviewer(s)

marcysutton commented 6 years ago

Actually it looks like there's a failing test due to some new formatting:

AssertionError: expected '
function(callback) {\n\t\t\t\t\tvar script = document.createElement(\'script\');\n\t\t\t\t\tscript
.innerHTML =\n\t\t\t\t\t\t\'document.documentElement.classList.add("deque-axe-is-ready");\';\n\t\t\t\t\tdocument.documentElement.appendChild(script);\n\t\t\t\t\tcallback();\n\t\t\t\t}

' to include '
.innerHTML = \'document.documentElement.classList.add("deque-axe-is-ready");\''

That looks sorta brittle....perhaps we should refactor it in a separate PR?

stephenmathieson commented 6 years ago

Wow, that is a strange test. Yes, I'll open another PR updating it. Thanks for pointing it out.

Opened PR #74.