Meet ESLint
Using a linter is a nice way to help you avoiding mistakes and encouraging a standard coding style. There is an excelent tool called ESLint for that. We will be using it in these series to restrict some language features while encouraging others.
Restricting imperative syntax
We will configure the linter to restrict imperative syntax to avoid relapses. The mindset used in functional programming is different, simpler than imperative, so we can eliminate language features that would cause confusion and that have good functional replacements.