.eslintrc 1.48 KB
Newer Older
1 2 3 4 5 6 7
{
  "env": {
    "browser": true
  },
  "globals": {
    "Drupal": true,
    "drupalSettings": true,
8
    "drupalTranslations": true,
9 10 11 12 13 14 15 16 17
    "domready": true,
    "jQuery": true,
    "_": true,
    "matchMedia": true,
    "Backbone": true,
    "Modernizr": true,
    "CKEDITOR": true
  },
  "rules": {
18 19 20 21
    // Errors.
    "block-scoped-var": 2,
    "brace-style": [2, "stroustrup", {"allowSingleLine": true}],
    "comma-style": [2, "last"],
22 23
    "eqeqeq": [2, "smart"],
    "guard-for-in": 2,
24
    "indent": [2, 2, {"indentSwitchCase": true}],
25 26
    "key-spacing": [2, {"beforeColon": false, "afterColon": true}],
    "no-implied-eval": 2,
27
    "no-mixed-spaces-and-tabs": 2,
28 29
    "no-nested-ternary": 2,
    "no-reserved-keys": 2,
30
    "no-trailing-spaces": 2,
31
    "no-undef": 2,
32
    "no-undefined": 2,
33
    "no-unused-vars": [2, {"vars": "local", "args": "none"}],
34
    "one-var": [2, "never"],
35
    "semi": [2, "always"],
36
    "space-after-keywords": [2, "always"],
37
    "space-before-blocks": [2, "always"],
38
    "space-before-function-paren": [2, {"anonymous": "always", "named": "never"}],
39 40 41
    "space-in-brackets": [2, "never"],
    "space-in-parens": [2, "never"],
    "spaced-line-comment": [2, "always"],
42
    "strict": 2,
43 44 45
    // Warnings.
    "max-nested-callbacks": [1, 3],
    // Disabled.
46
    "camelcase": 0,
47 48 49
    "consistent-return": 0,
    "dot-notation": 0,
    "new-cap": 0,
50
    "no-alert": 0,
51 52 53
    "no-new": 0,
    "no-shadow": 0,
    "no-underscore-dangle": 0,
54
    "no-use-before-define": 0,
55
    "quotes": 0
56 57
  }
}