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