For Visual Studio Code just download the ESLint extension as the following:
Note: make sure that the ESLint dependencies are installed, use npm install
instead.
The linter configurations are set using the recommended rules from eslint, jest and node. Additionally, there are some specific rules set and each one of them is set to throw an error:
- indent: set to
2
, enforces a consistent indentation style. more details - linebreak-style: set to
unix
, enforces consistent line endings independent of operating system, VCS, or editor used across your codebase. more details - quotes: set to
single
, enforces the consistent use of either backticks, double, or single quotes. more details - semi: set to
always
, require or disallow semicolons more details