DEV Community

Discussion on: Do you use syntax checking tools?

Collapse
 
itsasine profile image
ItsASine (Kayla)

I use ESLint and Jetbrains IDEs to import my rules into the editor and the Code -> Reformat Code menu.

I put the eslint command in my package.json scripts so it can be run easily off the local install. This can be added as an npm run config in IntelliJ to make it just a dropdown away.

I'm also really tempted to write a precommit hook at work to run npm run eslint -- --fix e2e-tests/** just to get people to actually run the thing often 😛

My rules are to extend the Google Style Guide, change a few things to be more ES5 friendly (allow var, define the version to be 5), remove the requirement for JSDocs, and add another rule to require new lines after variable declarations.