vhx / quartz-react

Quartz components using React
2 stars 1 forks source link

Fix Linter (and resolve lint issues) #48

Closed sebastiansandqvist closed 7 years ago

sebastiansandqvist commented 7 years ago

Overview

This PR solves a linting issue where none of the component files were being properly linted because eslint was not recursively checking files in the components directory. Changing /components/** to /components/**/** in package.json resolved this problem.

Once linting was fixed, there were many harmless stylistic errors that could be fixed by running npm run lint -- --fix. The majority of the changes in this PR are the result of running that.

Beyond that, there were a few manual changes:

  1. Ignore the no-console rule wherever we actually want logs, such as when (incorrectly) mounting multiple modal components.
  2. Add aria-roles and other jsx-a11y improvements.

There are still 7 remaining issues related to jsx-a11y that need to be improved, but might require a bit more time to resolve. This PR is meant to be a first step, and brings the lint errors/warnings down from 45 to 7.