summaryrefslogtreecommitdiffstats
path: root/.eslintrc
blob: f6f5a1400a4f45b90b1964c9f890c589a90b6db7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{
  "extends": "eslint:recommended",

  "parserOptions": {
    "ecmaVersion": 2017
  },

  "env": {
    "browser": true,
    "es6": true,
    "jquery": true
  },

  "rules": {
    //
    // Possible Errors
    //
    // The following rules point out areas where you might have made mistakes.
    //
    "comma-dangle": 2, // disallow or enforce trailing commas
    "no-console": 1, // disallow use of console (off by default in the node environment)
    "no-debugger": 2, // disallow use of debugger
    "no-empty": 2, // disallow empty statements
    "no-extra-semi": 2, // disallow unnecessary semicolons

    //
    // Best Practices
    //
    // These are rules designed to prevent you from making mistakes.
    // They either prescribe a better way of doing something or help you avoid footguns.
    //
    "eqeqeq": 2, // require the use of === and !==
    "no-alert": 2, // disallow the use of alert, confirm, and prompt
    "no-eval": 2, // disallow use of eval()
    "no-multi-spaces": 2, // disallow use of multiple spaces
    "no-redeclare": 2, // disallow declaring the same variable more then once

    //
    // Strict Mode
    //
    // These rules relate to using strict mode.
    //
    "strict": 0, // controls location of Use Strict Directives

    //
    // Stylistic Issues
    //
    // These rules are purely matters of style and are quite subjective.
    //
    "indent": [1, 2], // this option sets a specific tab width for your code (off by default)
    "brace-style": 1, // enforce one true brace style (off by default)
    "camelcase": 1, // require camel case names
    "comma-spacing": [1, {"before": false, "after": true}], // enforce spacing before and after comma
    "comma-style": [1, "last"], // enforce one true comma style (off by default)
    "eol-last": 1, // enforce newline at the end of file, with no multiple empty lines
    "quotes": [1, "single"], // specify whether double or single quotes should be used
    "semi": [1, "always"], // require or disallow use of semicolons instead of ASI
    "semi-spacing": [1, {"before": false, "after": true}], // enforce spacing before and after semicolons
    "sort-vars": 0, // sort variables within the same declaration block (off by default)

    //
    // ECMAScript 6
    //
    // These rules are only relevant to ES6 environments and are off by default.
    //
    "no-var": 2 // require let or const instead of var (off by default)
  }
}