summaryrefslogtreecommitdiffstats
path: root/.eslintrc
blob: b21e1dc2e8bdfbe837224bc4ab8c9ea731fc08ad (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
{
  "parser": "babel-eslint",
  "env": {
    "es6": true,
    "jquery": true,
    "node": true
  },
  "plugins": [
    "react",
    "import"
  ],
  "ecmaFeatures": {
    "jsx": true,
    "classes": true,
    "modules": true
  },
  "globals": {
    "window": true,
    "navigator": true,
    "System": true,
    "document": true,
    "localStorage": true,
    "sessionStorage": true,
    "Image": true,
    "requestAnimationFrame": true,
    "cancelAnimationFrame": true,
    "DEBUG": true,
    "SVGElement": true,
    "FormData": true,
    "DEV": true,
    "Blob": true,
    "XMLHttpRequest": true,
    "URL": true,
    "PunchOutRegistry": true,
    "it": true,
    "describe": true,
    "fetch": false
  },
  "rules": {
    "linebreak-style": 0,
    "no-unused-vars": 2,
    "no-bitwise": 0,
    "no-eq-null": 2,
    "eqeqeq": 2,
    "wrap-iife": [
      2,
      "any"
    ],
    "no-unused-expressions": 2,
    "indent": [
      2,
      2,
      {
        "SwitchCase": 1
      }
    ],
    "no-use-before-define": 2,
    "new-cap": [
      2,
      {
        "capIsNewExceptions": [
          "DataTable",
          "V"
        ]
      }
    ],
    "no-caller": 2,
    "no-empty": 2,
    "no-undef": 2,
    "quotes": [
      2,
      "single",
      "avoid-escape"
    ],
    "jsx-quotes": [
      2,
      "prefer-single"
    ],
    "no-plusplus": 0,
    "no-cond-assign": [
      2,
      "except-parens"
    ],
    "comma-style": [
      2,
      "last"
    ],
    "no-invalid-this": 0,
    "dot-notation": 0,
    "max-len": [
      //Default is 80 words in a line
      1,
      120,
      {
        "ignoreStrings": true,
        "ignoreUrls": true,
        "ignoreRegExpLiterals": true,
        //"ignorePattern": "^\\s*case\\s.+:"
        "ignorePattern": "^\\s*var\\s.+:\\s*require\\s*\\(/|^\\s*type\\s*:\\s*|^\\s*case\\s.+:"
      }
    ],
    "camelcase": [
      2,
      {
        "properties": "never"
      }
    ],
    "curly": 2,
    "brace-style": 0,
    "semi": [
      2,
      "always"
    ],
    "space-in-brackets": [
      0,
      "never"
    ],
    "space-infix-ops": 2,
    //This rule is aimed at ensuring there are spaces around infix operators.
    "import/default": 0,
    "import/no-unresolved": 0,
    "import/no-named-as-default": 2,
    "import/no-duplicates": 0,
    "import/imports-first": 2,
    "import/export": 2,
    "react/display-name": 0,
    "react/forbid-prop-types": 0,
    "react/jsx-boolean-value": 0,
    "react/jsx-closing-bracket-location": [
      1,
      {
        "nonEmpty": "after-props",
        "selfClosing": "after-props"
      }
    ],
    "react/jsx-curly-spacing": 0,
    //disallow spaces inside of curly braces in JSX attributes
    "react/jsx-max-props-per-line": 0,
    "react/jsx-no-duplicate-props": 1,
    "react/jsx-no-literals": 0,
    "react/jsx-no-undef": 1,
    "react/jsx-sort-prop-types": 0,
    "react/jsx-sort-props": 0,
    "react/jsx-uses-react": 1,
    "react/jsx-uses-vars": 1,
    "react/no-danger": 1,
    "react/no-did-mount-set-state": 2,
    "react/no-did-update-set-state": 2,
    "react/no-direct-mutation-state": 1,
    "react/no-multi-comp": 0,
    "react/no-set-state": 0,
    "react/no-unknown-property": 1,
    "react/prop-types": 0,
    "react/react-in-jsx-scope": 1,
    "react/require-extension": 1,
    "react/self-closing-comp": 1,
    "react/sort-comp": 0,
    "react/wrap-multilines": [
      1,
      {
        "declaration": true,
        "assignment": false,
        "return": true
      }
    ],
    "constructor-super": 2,
    "valid-jsdoc": 0,             // Ensure JSDoc comments are valid (off by default): Uncomment this after the js docs are added
    "default-case": 0,
    // require default case in switch statements (off by default)
    "no-array-constructor": 0,
    // disallow use of the Array constructor
    "no-comma-dangle": 0,
    // disallow trailing commas in object literals
    "no-var": 0
    // require let or const instead of var (off by default)
  }
}