{
  "root": true, // Don't use Drupal core's .eslintrc, creates build issues
  "env": {
    "browser": true,
    "es6": true
  },
  "parserOptions": {
    "ecmaVersion": 2020,
    "sourceType": "module"
  },
  "globals": {
    "Drupal": true,
    "drupalSettings": true,
    "domready": true,
    "jQuery": true,
    "_": true,
    "matchMedia": true,
    "Backbone": true,
    "Modernizr": true,
    "CKEDITOR": true
  },
  "rules": {
    // Errors.
    "block-scoped-var": 2,
    "brace-style": [2, "stroustrup", {"allowSingleLine": true}],
    "comma-style": [2, "last"],
    "eqeqeq": [2, "smart"],
    "guard-for-in": 2,
    "key-spacing": [2, {"beforeColon": false, "afterColon": true}],
    "no-implied-eval": 2,
    "no-mixed-spaces-and-tabs": 2,
    "no-nested-ternary": 2,
    "no-trailing-spaces": 2,
    "no-undef": 0,
    "no-undefined": 2,
    "no-unused-vars": [2, {"vars": "local", "args": "none"}],
    "semi": [2, "always"],
    "keyword-spacing": [2],
    "space-before-blocks": [2, "always"],
    "object-curly-spacing": [2, "always"],
    //    "array-bracket-spacing": [2, "always"],
    //    "space-in-parens": [2, "always"],
    "spaced-comment": ["error", "always", {
      "line": {
        "markers": ["/"],
        "exceptions": ["-", "+"]
      },
      "block": {
        "markers": ["!"],
        "exceptions": ["*"]
      }
    }],
    "strict": 2,
    // Warnings.
    "max-nested-callbacks": [1, 5],
    // Disabled.
    "camelcase": 0,
    "consistent-return": 0,
    "dot-notation": 0,
    "new-cap": 0,
    "no-alert": 0,
    "no-new": 0,
    "no-shadow": 0,
    "no-underscore-dangle": 0,
    "no-use-before-define": 0,
    "quotes": 0
  }
}
