kayvee 3.17.0 → 3.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,59 @@
1
1
  var assert = require("assert");
2
2
  var router = require("../lib/router");
3
- describe("router.Router", function () {
4
- describe("constructor", function () {
5
- it("parses well formatted configs", function () {
3
+ describe("router.Router", () => {
4
+ describe("constructor", () => {
5
+ it("parses well formatted configs", () => {
6
6
  process.env.SCHOOL = "Hogwarts";
7
- var conf = "\nroutes:\n rule-one:\n matchers:\n title: [\"authorize-app\"]\n output:\n type: \"notifications\"\n channel: \"%{foo.bar}\"\n icon: \":rocket:\"\n message: \"authorized %{foo.bar} in ${SCHOOL}\"\n user: \"@fishman\"\n rule-two:\n matchers:\n foo.bar: [\"multiple\", \"matches\"]\n baz: [\"whatever\"]\n output:\n type: \"alerts\"\n series: \"other-series\"\n dimensions: [\"baz\"]\n stat_type: \"gauge\"\n rule-three:\n matchers:\n foo.bar: [\"multiple\", \"matches\"]\n baz: [\"whatever\"]\n output:\n type: \"alerts\"\n series: \"other-series\"\n dimensions: [\"baz\"]\n stat_type: \"gauge\"\n value_field: \"hello\"\n rule-four:\n matchers:\n foo.bar: [\"multiple\", \"matches\"]\n baz: [\"whatever\"]\n output:\n type: \"alerts\"\n series: \"other-series\"\n dimensions: []\n stat_type: \"gauge\"\n rule-five:\n matchers:\n foo.bar: [true]\n baz: [false]\n output:\n type: \"alerts\"\n series: \"other-series\"\n dimensions: []\n stat_type: \"gauge\"\n";
8
- var expected = [
7
+ const conf = `
8
+ routes:
9
+ rule-one:
10
+ matchers:
11
+ title: ["authorize-app"]
12
+ output:
13
+ type: "notifications"
14
+ channel: "%{foo.bar}"
15
+ icon: ":rocket:"
16
+ message: "authorized %{foo.bar} in \${SCHOOL}"
17
+ user: "@fishman"
18
+ rule-two:
19
+ matchers:
20
+ foo.bar: ["multiple", "matches"]
21
+ baz: ["whatever"]
22
+ output:
23
+ type: "alerts"
24
+ series: "other-series"
25
+ dimensions: ["baz"]
26
+ stat_type: "gauge"
27
+ rule-three:
28
+ matchers:
29
+ foo.bar: ["multiple", "matches"]
30
+ baz: ["whatever"]
31
+ output:
32
+ type: "alerts"
33
+ series: "other-series"
34
+ dimensions: ["baz"]
35
+ stat_type: "gauge"
36
+ value_field: "hello"
37
+ rule-four:
38
+ matchers:
39
+ foo.bar: ["multiple", "matches"]
40
+ baz: ["whatever"]
41
+ output:
42
+ type: "alerts"
43
+ series: "other-series"
44
+ dimensions: []
45
+ stat_type: "gauge"
46
+ rule-five:
47
+ matchers:
48
+ foo.bar: [true]
49
+ baz: [false]
50
+ output:
51
+ type: "alerts"
52
+ series: "other-series"
53
+ dimensions: []
54
+ stat_type: "gauge"
55
+ `;
56
+ const expected = [
9
57
  new router.Rule("rule-one", { title: ["authorize-app"] }, {
10
58
  type: "notifications",
11
59
  channel: "%{foo.bar}",
@@ -42,119 +90,211 @@ describe("router.Router", function () {
42
90
  value_field: "value",
43
91
  }),
44
92
  ];
45
- var actual = new router.Router();
93
+ const actual = new router.Router();
46
94
  actual._loadConfigString(conf);
47
95
  assert.deepEqual(actual.rules, expected);
48
96
  });
49
- it("rejects specials in matchers", function () {
50
- var confTmpl = function (v) { return "\nroutes:\n non-string-values:\n matchers:\n no-numbers: [" + v + "]\n output:\n type: \"analytics\"\n series: \"fun\"\n"; };
97
+ it("rejects specials in matchers", () => {
98
+ const confTmpl = (v) => `
99
+ routes:
100
+ non-string-values:
101
+ matchers:
102
+ no-numbers: [${v}]
103
+ output:
104
+ type: "analytics"
105
+ series: "fun"
106
+ `;
51
107
  // Make sure the template works
52
- var conf = confTmpl('"valid"');
53
- var actual = new router.Router();
54
- assert.doesNotThrow(function () { return actual._loadConfigString(conf); });
55
- var _loop_1 = function (invalidVal) {
56
- var invalidConf = confTmpl(invalidVal);
57
- assert.throws(function () { return actual._loadConfigString(invalidConf); });
58
- };
59
- for (var _i = 0, _a = ["5", "[]", "{}"]; _i < _a.length; _i++) {
60
- var invalidVal = _a[_i];
61
- _loop_1(invalidVal);
108
+ const conf = confTmpl('"valid"');
109
+ const actual = new router.Router();
110
+ assert.doesNotThrow(() => actual._loadConfigString(conf));
111
+ for (const invalidVal of ["5", "[]", "{}"]) {
112
+ const invalidConf = confTmpl(invalidVal);
113
+ assert.throws(() => actual._loadConfigString(invalidConf));
62
114
  }
63
- assert.throws(function () { return actual._loadConfigString(confTmpl('""')); });
115
+ assert.throws(() => actual._loadConfigString(confTmpl('""')));
64
116
  return;
65
117
  });
66
- it("rejects duplicates in matchers", function () {
67
- var confTmpl = function (v) { return "\nroutes:\n sloppy:\n matchers:\n title: [" + v + "]\n output:\n type: \"analytics\"\n series: \"fun\"\n"; };
68
- var actual = new router.Router();
69
- var validConf = confTmpl('"non-repeated", "name"');
70
- assert.doesNotThrow(function () { return actual._loadConfigString(validConf); });
71
- var invalidConf = confTmpl('"repeated", "repeated", "name"');
72
- assert.throws(function () { return actual._loadConfigString(invalidConf); });
118
+ it("rejects duplicates in matchers", () => {
119
+ const confTmpl = (v) => `
120
+ routes:
121
+ sloppy:
122
+ matchers:
123
+ title: [${v}]
124
+ output:
125
+ type: "analytics"
126
+ series: "fun"
127
+ `;
128
+ const actual = new router.Router();
129
+ const validConf = confTmpl('"non-repeated", "name"');
130
+ assert.doesNotThrow(() => actual._loadConfigString(validConf));
131
+ const invalidConf = confTmpl('"repeated", "repeated", "name"');
132
+ assert.throws(() => actual._loadConfigString(invalidConf));
73
133
  });
74
- it("requires correct types in outputs", function () {
75
- var confTmpl = function (series, dimensions) { return "\nroutes:\n wrong:\n matchers:\n title: [\"test\"]\n output:\n type: \"alerts\"\n series: " + series + "\n dimensions: " + dimensions + "\n value_field: \"hihi\"\n stat_type: \"gauge\"\n"; };
76
- var actual = new router.Router();
77
- var validConf = confTmpl('"my-series"', '["dim1", "dim2"]');
78
- assert.doesNotThrow(function () { return actual._loadConfigString(validConf); });
79
- var invalidConf0 = confTmpl('["my-series"]', '["dim1", "dim2"]');
80
- assert.throws(function () { return actual._loadConfigString(invalidConf0); });
81
- var invalidConf1 = confTmpl('"my-series"', '"dim1"');
82
- assert.throws(function () { return actual._loadConfigString(invalidConf1); });
134
+ it("requires correct types in outputs", () => {
135
+ const confTmpl = (series, dimensions) => `
136
+ routes:
137
+ wrong:
138
+ matchers:
139
+ title: ["test"]
140
+ output:
141
+ type: "alerts"
142
+ series: ${series}
143
+ dimensions: ${dimensions}
144
+ value_field: "hihi"
145
+ stat_type: "gauge"
146
+ `;
147
+ const actual = new router.Router();
148
+ const validConf = confTmpl('"my-series"', '["dim1", "dim2"]');
149
+ assert.doesNotThrow(() => actual._loadConfigString(validConf));
150
+ const invalidConf0 = confTmpl('["my-series"]', '["dim1", "dim2"]');
151
+ assert.throws(() => actual._loadConfigString(invalidConf0));
152
+ const invalidConf1 = confTmpl('"my-series"', '"dim1"');
153
+ assert.throws(() => actual._loadConfigString(invalidConf1));
83
154
  });
84
- it("requires all keys in outputs", function () {
85
- var confTmpl = function (v) { return "\nroutes:\n wrong:\n matchers:\n title: [\"test\"]\n output:\n type: \"alerts\"" + v + "\n dimensions: [\"dim1\", \"dim2\"]\n stat_type: \"gauge\"\n"; };
86
- var actual = new router.Router();
87
- var validConf = confTmpl("\n series: \"whatever\"");
88
- assert.doesNotThrow(function () { return actual._loadConfigString(validConf); });
89
- var invalidConf = confTmpl("");
90
- assert.throws(function () { return actual._loadConfigString(invalidConf); });
155
+ it("requires all keys in outputs", () => {
156
+ const confTmpl = (v) => `
157
+ routes:
158
+ wrong:
159
+ matchers:
160
+ title: ["test"]
161
+ output:
162
+ type: "alerts"${v}
163
+ dimensions: ["dim1", "dim2"]
164
+ stat_type: "gauge"
165
+ `;
166
+ const actual = new router.Router();
167
+ const validConf = confTmpl(`
168
+ series: "whatever"`);
169
+ assert.doesNotThrow(() => actual._loadConfigString(validConf));
170
+ const invalidConf = confTmpl("");
171
+ assert.throws(() => actual._loadConfigString(invalidConf));
91
172
  });
92
- it("doesn't allow extra keys", function () {
93
- var confTmpl = function (v) { return "\nroutes:\n wrong:\n matchers:\n title: [\"test\"]\n output:\n type: \"metrics\"" + v + "\n dimensions: [\"dim1\", \"dim2\"]\n"; };
94
- var actual = new router.Router();
95
- var validConf = confTmpl("\n series: \"whatever\"");
96
- assert.doesNotThrow(function () { return actual._loadConfigString(validConf); });
97
- var invalidConf = confTmpl("\n series: \"whatever\"\n something-else: \"hi there\"");
98
- assert.throws(function () { return actual._loadConfigString(invalidConf); });
173
+ it("doesn't allow extra keys", () => {
174
+ const confTmpl = (v) => `
175
+ routes:
176
+ wrong:
177
+ matchers:
178
+ title: ["test"]
179
+ output:
180
+ type: "metrics"${v}
181
+ dimensions: ["dim1", "dim2"]
182
+ `;
183
+ const actual = new router.Router();
184
+ const validConf = confTmpl(`
185
+ series: "whatever"`);
186
+ assert.doesNotThrow(() => actual._loadConfigString(validConf));
187
+ const invalidConf = confTmpl(`
188
+ series: "whatever"
189
+ something-else: "hi there"`);
190
+ assert.throws(() => actual._loadConfigString(invalidConf));
99
191
  });
100
- it("errors on type-os", function () {
101
- var actual = new router.Router();
102
- var config;
103
- config = "\nroute: # Should be routes (plural)\n string-values:\n matchers:\n errors: [ \"type-o\" ]\n output:\n type: \"analytics\"\n series: \"fun\"\n";
104
- assert.throws(function () { return actual._loadConfigString(config); });
105
- config = "\nroutes:\n string-values:\n matcher: # Should be matchers (plural)\n errors: [ \"type-o\" ]\n output:\n type: \"analytics\"\n series: \"fun\"\n";
106
- assert.throws(function () { return actual._loadConfigString(config); });
107
- config = "\nroutes:\n string-values:\n matchers:\n errors: [ \"type-o\" ]\n outputs: # Should be output (signular)\n type: \"analytics\"\n series: \"fun\"\n";
108
- assert.throws(function () { return actual._loadConfigString(config); });
109
- config = "\nroutes:\n $invalid-string-values: # Invalid rule name\n matchers:\n errors: [ \"type-o\" ]\n output:\n type: \"analytics\"\n series: \"fun\"\n";
110
- assert.throws(function () { return actual._loadConfigString(config); });
111
- config = "\nroutes:\n string-values:\n matchers:\n errors: [ \"type-o\" ]\n output:\n type: \"analytic\" # Should be analytics (plural)p\n series: \"fun\"\n";
112
- assert.throws(function () { return actual._loadConfigString(config); });
113
- config = "\nroutes:\n string-values:\n matchers:\n errors: [ \"*\", \"type-o\" ] # A wildcard cannot exist with other matchers\n output:\n type: \"analytics\"\n series: \"fun\"\n";
114
- assert.throws(function () { return actual._loadConfigString(config); });
192
+ it("errors on type-os", () => {
193
+ const actual = new router.Router();
194
+ let config;
195
+ config = `
196
+ route: # Should be routes (plural)
197
+ string-values:
198
+ matchers:
199
+ errors: [ "type-o" ]
200
+ output:
201
+ type: "analytics"
202
+ series: "fun"
203
+ `;
204
+ assert.throws(() => actual._loadConfigString(config));
205
+ config = `
206
+ routes:
207
+ string-values:
208
+ matcher: # Should be matchers (plural)
209
+ errors: [ "type-o" ]
210
+ output:
211
+ type: "analytics"
212
+ series: "fun"
213
+ `;
214
+ assert.throws(() => actual._loadConfigString(config));
215
+ config = `
216
+ routes:
217
+ string-values:
218
+ matchers:
219
+ errors: [ "type-o" ]
220
+ outputs: # Should be output (signular)
221
+ type: "analytics"
222
+ series: "fun"
223
+ `;
224
+ assert.throws(() => actual._loadConfigString(config));
225
+ config = `
226
+ routes:
227
+ $invalid-string-values: # Invalid rule name
228
+ matchers:
229
+ errors: [ "type-o" ]
230
+ output:
231
+ type: "analytics"
232
+ series: "fun"
233
+ `;
234
+ assert.throws(() => actual._loadConfigString(config));
235
+ config = `
236
+ routes:
237
+ string-values:
238
+ matchers:
239
+ errors: [ "type-o" ]
240
+ output:
241
+ type: "analytic" # Should be analytics (plural)p
242
+ series: "fun"
243
+ `;
244
+ assert.throws(() => actual._loadConfigString(config));
245
+ config = `
246
+ routes:
247
+ string-values:
248
+ matchers:
249
+ errors: [ "*", "type-o" ] # A wildcard cannot exist with other matchers
250
+ output:
251
+ type: "analytics"
252
+ series: "fun"
253
+ `;
254
+ assert.throws(() => actual._loadConfigString(config));
115
255
  });
116
256
  });
117
- describe("route", function () {
118
- it("matches one or more rule and returns appropriate outputs", function () {
119
- var r = new router.Router([
257
+ describe("route", () => {
258
+ it("matches one or more rule and returns appropriate outputs", () => {
259
+ const r = new router.Router([
120
260
  new router.Rule("rule-one", { title: ["hello", "hi"], foo: ["bar", "baz"] }, { channel: "#-%{foo}-", dimensions: ["-%{foo}-"] }),
121
261
  new router.Rule("rule-two", { "bing.bong": ["buzz"] }, { series: "x" }),
122
262
  ]);
123
- var msg0 = {
263
+ const msg0 = {
124
264
  title: "hi",
125
265
  foo: "bar",
126
266
  };
127
- var expected0 = [
267
+ const expected0 = [
128
268
  {
129
269
  rule: "rule-one",
130
270
  channel: "#-bar-",
131
271
  dimensions: ["-bar-"],
132
272
  },
133
273
  ];
134
- var actual0 = r.route(msg0).routes;
274
+ const actual0 = r.route(msg0).routes;
135
275
  assert.deepEqual(expected0, actual0);
136
- var msg1 = {
276
+ const msg1 = {
137
277
  title: "hi",
138
278
  bing: {
139
279
  bong: "buzz",
140
280
  },
141
281
  };
142
- var expected1 = [
282
+ const expected1 = [
143
283
  {
144
284
  rule: "rule-two",
145
285
  series: "x",
146
286
  },
147
287
  ];
148
- var actual1 = r.route(msg1).routes;
288
+ const actual1 = r.route(msg1).routes;
149
289
  assert.deepEqual(expected1, actual1);
150
- var msg2 = {
290
+ const msg2 = {
151
291
  title: "hello",
152
292
  foo: "baz",
153
293
  bing: {
154
294
  bong: "buzz",
155
295
  },
156
296
  };
157
- var expected2 = [
297
+ const expected2 = [
158
298
  {
159
299
  rule: "rule-one",
160
300
  channel: "#-baz-",
@@ -165,15 +305,15 @@ describe("router.Router", function () {
165
305
  series: "x",
166
306
  },
167
307
  ];
168
- var actual2 = r.route(msg2).routes;
308
+ const actual2 = r.route(msg2).routes;
169
309
  assert.deepEqual(expected2, actual2);
170
310
  });
171
311
  });
172
312
  });
173
- describe("router.Rule", function () {
174
- describe("matches", function () {
175
- it("works on simple cases", function () {
176
- var r = new router.Rule("test-rule", { title: ["hello", "hi"], foo: ["bar"] }, {});
313
+ describe("router.Rule", () => {
314
+ describe("matches", () => {
315
+ it("works on simple cases", () => {
316
+ const r = new router.Rule("test-rule", { title: ["hello", "hi"], foo: ["bar"] }, {});
177
317
  assert(r.matches({
178
318
  title: "hello",
179
319
  foo: "bar",
@@ -194,8 +334,8 @@ describe("router.Rule", function () {
194
334
  "missing-stuff": "indeed",
195
335
  }));
196
336
  });
197
- it("works on nested messages", function () {
198
- var r = new router.Rule("test-rule", { "foo.bar": ["hello", "hi"] }, {});
337
+ it("works on nested messages", () => {
338
+ const r = new router.Rule("test-rule", { "foo.bar": ["hello", "hi"] }, {});
199
339
  assert(r.matches({
200
340
  title: "greeting",
201
341
  foo: {
@@ -231,8 +371,8 @@ describe("router.Rule", function () {
231
371
  foo: "hi",
232
372
  }));
233
373
  });
234
- it("wild card matching", function () {
235
- var r = new router.Rule("test-rule", { any: ["*"] }, {});
374
+ it("wild card matching", () => {
375
+ const r = new router.Rule("test-rule", { any: ["*"] }, {});
236
376
  assert(r.matches({
237
377
  any: false,
238
378
  }));
@@ -263,8 +403,8 @@ describe("router.Rule", function () {
263
403
  },
264
404
  }));
265
405
  });
266
- it("bool matching", function () {
267
- var r = new router.Rule("test-rule", { bull: [true] }, {});
406
+ it("bool matching", () => {
407
+ const r = new router.Rule("test-rule", { bull: [true] }, {});
268
408
  assert(r.matches({
269
409
  bull: true,
270
410
  }));
@@ -286,25 +426,25 @@ describe("router.Rule", function () {
286
426
  }));
287
427
  });
288
428
  });
289
- describe("outputFor", function () {
290
- it("substitutes kv entries", function () {
291
- var r = new router.Rule("myrule", {}, {
429
+ describe("outputFor", () => {
430
+ it("substitutes kv entries", () => {
431
+ const r = new router.Rule("myrule", {}, {
292
432
  channel: "#-%{foo}-",
293
433
  dimensions: ["-%{foo}-", "-%{bar.baz}-"],
294
434
  });
295
- var msg = {
435
+ const msg = {
296
436
  title: "greeting",
297
437
  foo: "partner",
298
438
  bar: {
299
439
  baz: "nest egg",
300
440
  },
301
441
  };
302
- var expected = {
442
+ const expected = {
303
443
  rule: "myrule",
304
444
  channel: "#-partner-",
305
445
  dimensions: ["-partner-", "-nest egg-"],
306
446
  };
307
- var actual = r.outputFor(msg);
447
+ const actual = r.outputFor(msg);
308
448
  assert.deepEqual(expected, actual);
309
449
  });
310
450
  });
@@ -40,6 +40,7 @@ class Logger {
40
40
  globals = null;
41
41
  logWriter = null;
42
42
  logRouter = null;
43
+ asyncLocalStorage = null;
43
44
 
44
45
  constructor(
45
46
  source,
@@ -52,6 +53,7 @@ class Logger {
52
53
  this.globals = {};
53
54
  this.globals.source = source;
54
55
  this.logWriter = output;
56
+ this.asyncLocalStorage = null;
55
57
 
56
58
  if (process.env._TEAM_OWNER) {
57
59
  this.globals.team = process.env._TEAM_OWNER;
@@ -76,6 +78,10 @@ class Logger {
76
78
  }
77
79
  }
78
80
 
81
+ setAsyncLocalStorage(asyncLocalStorage) {
82
+ this.asyncLocalStorage = asyncLocalStorage;
83
+ }
84
+
79
85
  setRouter(r) {
80
86
  this.logRouter = r;
81
87
  }
@@ -238,7 +244,17 @@ class Logger {
238
244
  if (LOG_LEVEL_ENUM[logLvl] < LOG_LEVEL_ENUM[this.logLvl]) {
239
245
  return;
240
246
  }
241
- const data = assign({ level: logLvl }, this.globals, metadata, userdata);
247
+ // I'm not clever enough to want to do these in one line without extra vars.
248
+ // We're on a REALLY old version of TS compiling to ES5. So I don't get a lot of the fancy tools
249
+ // like ?. and ??.
250
+ const store = this.asyncLocalStorage && this.asyncLocalStorage.getStore();
251
+ const storeData = store || { get: () => ({}) };
252
+ const contextData = storeData.get("context") ? storeData.get("context") : {};
253
+ const plainContextData =
254
+ contextData instanceof Map ? Object.fromEntries(contextData) : contextData;
255
+
256
+ var data = assign({ level: logLvl }, this.globals, metadata, plainContextData, userdata);
257
+
242
258
  if (this.logRouter) {
243
259
  data._kvmeta = this.logRouter.route(data);
244
260
  } else if (globalRouter) {
package/lib/middleware.ts CHANGED
@@ -161,7 +161,7 @@ function handlerData(handlers, ...args) {
161
161
  const handler_data = h(...args);
162
162
  _.extend(data, handler_data);
163
163
  } catch (e) {
164
- // ignore invalid handler
164
+ // swallow invalid handler
165
165
  }
166
166
  });
167
167
  return data;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kayvee",
3
3
  "description": "Write data to key=val pairs, for human and machine readability",
4
- "version": "3.17.0",
4
+ "version": "3.18.0",
5
5
  "main": "index.js",
6
6
  "repository": {
7
7
  "type": "git",
@@ -19,20 +19,24 @@
19
19
  "@clever/prettier-config": "1.0.0",
20
20
  "@types/mocha": "^8.0.3",
21
21
  "@types/node": "^12.12.68",
22
+ "@typescript-eslint/eslint-plugin": "^5.2.0",
23
+ "@typescript-eslint/parser": "^5.2.0",
22
24
  "babel-eslint": "^6.0.2",
23
25
  "benchmark": "^2.1.1",
24
- "eslint": "^2.7.0",
26
+ "eslint": "^7.11.0",
25
27
  "eslint-config-airbnb": "^7.0.0",
26
- "eslint-plugin-jsx-a11y": "^0.6.2",
27
- "eslint-plugin-react": "^4.3.0",
28
+ "eslint-config-prettier": "^6.12.0",
29
+ "eslint-formatter-summary": "^1.1.0",
30
+ "eslint-plugin-jsx-a11y": "^6.3.1",
31
+ "eslint-plugin-react": "^7.21.5",
32
+ "eslint-plugin-react-hooks": "^4.1.2",
28
33
  "express": "^4.13.4",
29
34
  "mocha": "^3.5.3",
30
35
  "prettier": "2.1.2",
31
36
  "sinon": "^1.17.4",
32
37
  "supertest": "^1.2.0",
33
38
  "ts-node": "^9.0.0",
34
- "tslint": "^3.7.4",
35
- "typescript": "^4.0.3"
39
+ "typescript": "^3.9.10"
36
40
  },
37
41
  "scripts": {
38
42
  "test": "make -Br test",
@@ -29,7 +29,7 @@ function afterTest(count, callback) {
29
29
  args[2] = args[2] || arg2;
30
30
 
31
31
  if (count === i) {
32
- callback.apply(null, args);
32
+ callback(...args);
33
33
  }
34
34
  };
35
35
  }
package/tsconfig.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "module": "commonjs",
4
- "target": "es5",
4
+ "target": "ES2019",
5
5
  "noImplicitAny": false
6
6
  },
7
7
  "exclude": [
package/.eslintrc.yml DELETED
@@ -1,44 +0,0 @@
1
- extends: "airbnb"
2
- env:
3
- mocha: true
4
- parser: "babel-eslint"
5
- parserOptions:
6
- ecmaVersion: 6
7
- rules:
8
- # no hard limit on line length
9
- max-len: 0
10
-
11
- # we allow use of console...for now
12
- no-console: 0
13
-
14
- # we currently use snake case in most places, however, we'd like to switch to camelCase eventually since it's more common in the JS community
15
- camelcase: 0
16
-
17
- # vars are necessary for server-side requires right now
18
- no-var: 0
19
- vars-on-top: 0
20
-
21
- # multi spaces only allowed for aligning variable/import declarations
22
- no-multi-spaces:
23
- - 2
24
- - exceptions:
25
- VariableDeclarator: true
26
- ImportDeclaration: true
27
-
28
- # we currently use null in many places, so allow == for null checks
29
- eqeqeq:
30
- - 2
31
- - "smart"
32
-
33
- quotes: [2, "double", "avoid-escape"]
34
- new-cap:
35
- - 2
36
- - newIsCapExceptions: ["kayvee.logger"]
37
- no-param-reassign:
38
- - 2
39
- - props: false
40
- key-spacing:
41
- - 2
42
- - mode: "minimum"
43
-
44
- guard-for-in: 0