dhmit / democracy_africa

dhmit's spring 2020 project - Democracy and Development: Perspectives from Africa
4 stars 2 forks source link

Update eslint settings and lint everything #76

Closed ryaanahmed closed 4 years ago

ryaanahmed commented 4 years ago

Because someone (ahem... me...) forgot to import the airbnb style guide into our eslintrc at the beginning of this project, our linter settings were a little sloppy. This makes them stricter, and -- as penance -- I've linted the whole project.

Also by popular demand, two settings now throw warnings in development but errors on the CI server: no-unused-var and indent. (thanks to @srisi for the idea). no-unused-var erroring was particularly inconvenient, as when prototyping, commenting out a single use of a variable to see what's going on could lead to a whole chain of unused vars and a bunch of wasted time. Same deal with the linter requiring completely correct indentation of JSX before it would even compile.

ryaanahmed commented 4 years ago

Latest linter failure is the linter failing as expected on code that just warns locally:

Screen Shot 2020-04-06 at 12 59 18 PM

But just realized I don't need a second eslintrc to do this... can just set max-warnings for CI.