Migrate to ESLint 馃敡
Created by: felixfbecker
Closes #2461
Very excited about this one as ESLint has support for a bunch of new rules that we can now check for that often came up in code reviews, e.g. referencing this.state
inside setState()
and many more.
I recreated our TSLint config in https://github.com/sourcegraph/eslint-config and made https://github.com/sourcegraph/tslint-config/tree/eslint contain only the few TSLint rules ESLint doesn't have.
Migratingwas more work than expected but it's a huge improvement to our codebase, e.g. finally refactored all usages of async-unsafe componentWillReceiveProps()
to componentDidUpdate()
, removing unused state properties, ...
Also like the better configurability of ESLint - configuring rules for glob patterns or overriding severity in comments.
I also noticed we were not typechecking our code in CI! So this fixes it.
cc @JoshuaKGoldberg