.eslintrc.json 1.21 KB
Newer Older
1
{
2
3
  "extends": [
    "airbnb",
4
5
    "plugin:prettier/recommended",
    "plugin:yml/recommended"
6
  ],
7
  "root": true,
8
  "env": {
9
10
11
    "browser": true,
    "es6": true,
    "node": true
12
13
14
15
16
17
18
  },
  "globals": {
    "Drupal": true,
    "drupalSettings": true,
    "drupalTranslations": true,
    "jQuery": true,
    "_": true,
19
    "Cookies": true,
20
21
    "Backbone": true,
    "Modernizr": true,
22
    "loadjs": true,
23
    "Popper": true,
24
    "Shepherd": true,
25
    "Sortable": true,
26
    "once": true,
27
28
    "CKEDITOR": true,
    "tabbable": true
29
  },
30
31
32
33
34
  "settings": {
    "react": {
      "version": "latest"
    }
  },
35
  "rules": {
36
    "prettier/prettier": "error",
37
38
39
40
41
    "consistent-return": ["off"],
    "no-underscore-dangle": ["off"],
    "max-nested-callbacks": ["warn", 3],
    "import/no-mutable-exports": ["warn"],
    "no-plusplus": ["warn", {
42
43
      "allowForLoopAfterthoughts": true
    }],
44
45
46
    "no-param-reassign": ["off"],
    "no-prototype-builtins": ["off"],
    "valid-jsdoc": ["warn", {
47
48
49
50
51
      "prefer": {
        "returns": "return",
        "property": "prop"
      },
      "requireReturn": false
52
    }],
53
    "no-unused-vars": ["warn"],
54
    "operator-linebreak": ["error", "after", { "overrides": { "?": "ignore", ":": "ignore" } }]
55
56
  }
}