JavaScript Code Style

General rules

Linting

{
  "parser": "babel-eslint", // Prefer ES6
  "extends": "airbnb" // Use airbnb configuration
  "rules": {
    "strict": 0, // Babel adds 'strict' comment automatically
    "semi": [2, "never"], // Babel adds semicolons automatically
    "comma-dangle": [2, "never"], // Because of visual appearance
    "func-names": 0, // Sometimes it's necessary to name anonymous functions
    "max-len": [1, 120, 4], // Increase max line length
    "no-alert": 0 // Sometimes standard browser alerts are specified in requirements
  },
  "globals": { // List of constants imported from sprockets or using webpack's global require
    "$": true,
    "I18n": true
  }
}