.eslintrc.json 2.67 KB
Newer Older
1
{
Andrew Hrdy's avatar
Andrew Hrdy committed
2
3
4
5
6
7
8
9
10
  "env": {
    "browser": true,
    "commonjs": true,
    "es6": true,
    "node": true
  },
  "parserOptions": {
    "ecmaFeatures": {
      "jsx": true
11
    },
Andrew Hrdy's avatar
Andrew Hrdy committed
12
13
14
15
16
17
18
19
20
21
    "sourceType": "module"
  },
  "extends": "eslint:recommended",
  "rules": {
    //Overridden from eslint:reccomended
    "no-console": "off",
    //Possible Errors
    "for-direction": "warn",
    "no-template-curly-in-string": "warn",
    //Best Practices
Andrew Hrdy's avatar
Andrew Hrdy committed
22
23
    "block-scoped-var": "error",
    "no-empty-function": "error",
Andrew Hrdy's avatar
Andrew Hrdy committed
24
25
    "no-implicit-globals": "error",
    "no-invalid-this": "error",
Andrew Hrdy's avatar
Andrew Hrdy committed
26
    "no-multi-spaces": "error",
Andrew Hrdy's avatar
Andrew Hrdy committed
27
28
29
    "no-self-compare": "warn",
    //Variables
    "no-shadow": "error",
Andrew Hrdy's avatar
Andrew Hrdy committed
30
    "no-shadow-restricted-names": "error",
Andrew Hrdy's avatar
Andrew Hrdy committed
31
32
    "no-undef-init": "error",
    //Styling
Andrew Hrdy's avatar
Andrew Hrdy committed
33
34
    "array-bracket-spacing": "error",
    "block-spacing": "error",
Andrew Hrdy's avatar
Andrew Hrdy committed
35
    "brace-style": "error",
Andrew Hrdy's avatar
Andrew Hrdy committed
36
    "camelcase": "error",
Andrew Hrdy's avatar
Andrew Hrdy committed
37
38
    "comma-dangle": "warn",
    "comma-spacing": "warn",
Andrew Hrdy's avatar
Andrew Hrdy committed
39
40
    "computed-property-spacing": "error",
    "func-call-spacing": "error",
Andrew Hrdy's avatar
Andrew Hrdy committed
41
42
43
44
45
46
47
48
49
50
51
52
    "implicit-arrow-linebreak": "warn",
    "indent": "error",
    "jsx-quotes": "error",
    "key-spacing": "warn",
    "keyword-spacing": "warn",
    "lines-between-class-members": "warn",
    "multiline-comment-style": "warn",
    "no-lonely-if": "warn",
    "no-multiple-empty-lines": "warn",
    "no-tabs": "error",
    "no-trailing-spaces": "error",
    "no-whitespace-before-property": "error",
Andrew Hrdy's avatar
Andrew Hrdy committed
53
54
55
56
    "object-curly-newline": [
      "warn",
      "always"
    ],
Andrew Hrdy's avatar
Andrew Hrdy committed
57
58
59
60
    "object-curly-spacing": "warn",
    "object-property-newline": "warn",
    "operator-assignment": "warn",
    "operator-linebreak": "warn",
Andrew Hrdy's avatar
Andrew Hrdy committed
61
62
63
64
65
66
67
68
    "quote-props": [
      "warn",
      "as-needed"
    ],
    "quotes": [
      "warn",
      "single"
    ],
Andrew Hrdy's avatar
Andrew Hrdy committed
69
    "semi": "error",
Andrew Hrdy's avatar
Andrew Hrdy committed
70
71
72
73
74
75
76
    "semi-spacing": [
      "error",
      {
        "before": false,
        "after": true
      }
    ],
Andrew Hrdy's avatar
Andrew Hrdy committed
77
    "semi-style": "error",
Andrew Hrdy's avatar
Andrew Hrdy committed
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
    "space-before-blocks": "error",
    "space-before-function-paren": [
      "error",
      "never"
    ],
    "space-in-parens": "error",
    "space-infix-ops": "error",
    "space-unary-ops": [
      "error",
      {
        "words": true,
        "nonwords": false
      }
    ],
    "switch-colon-spacing": "error",
Andrew Hrdy's avatar
Andrew Hrdy committed
93
    //ECMAScript 6
Andrew Hrdy's avatar
Andrew Hrdy committed
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    "arrow-parens": "warn",
    "arrow-spacing": [
      "warn",
      {
        "before": true,
        "after": true
      }
    ],
    "no-duplicate-imports": "warn",
    "no-useless-computed-key": "warn",
    "no-useless-rename": "warn",
    "no-var": "error",
    "prefer-arrow-callback": "warn",
    "prefer-const": "error",
    "prefer-rest-params": "error",
    "prefer-spread": "error",
    "prefer-template": "warn",
    "rest-spread-spacing": "error",
    "template-curly-spacing": "error"
Andrew Hrdy's avatar
Andrew Hrdy committed
113
  }
114
}