Javascript Coding Standards

1. Import IntelliJ IDEA Code Layout Preferences

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.

2. Define the Javascript version as ECMAScript 6

In File > Other Settings > Preferences for New Projects, under Languages and Frameworks > Javascript, ensure that the language is set to ECMAScript 6 to that you can write code using the latest Javascript language:

3. Disable non-ESLint IntelliJ Inspections

IntelliJ comes with a set of “Inspections” for a wide variety of languages and environments in Preferences | Editor | Inspections:

In File > Other Settings, Preferences for New Projects, go to Edit > Inspections, and disable all Inspections except for ESLint. The window should look like this:

4. Enable ESLint and the AirBnB Javascript Coding Standards

Follow the instructions in Experience Install ESLint to install ESLint into your project.