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