Import the ics-se-code-style.xml file into IntelliJ IDEA, and make sure it is the default code style:
Once set, then the Code > Reformat Code command will reformat code to comply with our standards.
Install ESLint into your global node environment following the Install ESLint Experience.
After that, Preferences > Languages and Frameworks > Javascript > Code Quality > ESLint can be enabled for your project:
In addition, your project will have a .eslintrc file specifying the guidelines that ESLint should apply to your Javascript files:
As a result, IntelliJ will run ESLint in the background and flag any violations with a red line in the right margin:
IntelliJ comes with a set of “Inspections” for a wide variety of languages and environments in Preferences | Editor | Inspections
:
Please disable these inspections as they tend to generate lots of “warnings” that don’t actually identify bad code. Use ESLint to identify problems.
To disable them, click on the checkbox next to Javascript until it is empty (white). Then, to make this a global change (as opposed to a project-specific change), click on “Manage” and then “Set as Global”.
In Preferences > Languages and Frameworks > Javascript, set the language to ECMAScript 6 to that you can write code using the latest Javascript language release: