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