.eslintrc.json 1.1 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
    "Sortable": true,
23
24
    "CKEDITOR": true
  },
25
26
27
28
29
  "settings": {
    "react": {
      "version": "latest"
    }
  },
30
  "rules": {
31
    "prettier/prettier": "error",
32
33
34
35
36
    "consistent-return": ["off"],
    "no-underscore-dangle": ["off"],
    "max-nested-callbacks": ["warn", 3],
    "import/no-mutable-exports": ["warn"],
    "no-plusplus": ["warn", {
37
38
      "allowForLoopAfterthoughts": true
    }],
39
40
41
    "no-param-reassign": ["off"],
    "no-prototype-builtins": ["off"],
    "valid-jsdoc": ["warn", {
42
43
44
45
46
      "prefer": {
        "returns": "return",
        "property": "prop"
      },
      "requireReturn": false
47
    }],
48
    "no-unused-vars": ["warn"],
49
    "operator-linebreak": ["error", "after", { "overrides": { "?": "ignore", ":": "ignore" } }]
50
51
  }
}