Closed olleharstedt closed 2 years ago
Flow from Facebook can also be used. It can detect bugs that a linter will not. It requires the line
/* @flow */
at the top of each file.
They're not entirely exclusive, Flow and ESLint go hand in hand although you can configure ESLint to also lint your codebase with Flow through this plugin.
From personal experience both are amazing tools, and Flow allows you to introduce static types to your codebase gradually (instead of all at once like with Typescript). I'd maybe recommend to start with ESlint using the "recommended" ruleset that comes with it, and go from there.
Yes, I think that's a good idea, too.
I added in eslint as a dev dependency, and updated the linting rules to my favorite: airbnb-base with some modifications.
Don't know which linter is best right now for Javascript. Any ideas?