Skip to content

Commit 5a69b8b

Browse files
committed
chore: fix linting errors
1 parent 7bb9c57 commit 5a69b8b

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

lib/extended_json.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,9 @@ function serializeDocument(doc, options) {
288288
return doc.toExtendedJSON(options);
289289
}
290290
// TODO: should we throw an exception if there's a BSON type that has no toExtendedJSON method?
291-
}
291+
}
292292

293-
// Recursively serialize this document's property values.
293+
// Recursively serialize this document's property values.
294294
const _doc = {};
295295
for (let name in doc) {
296296
_doc[name] = serializeValue(doc[name], options);

test/node/extended_json_tests.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ const Timestamp = BSON.Timestamp;
2626
function getOldObjectID() {
2727
try {
2828
// do a dynamic resolve to avoid exception when running browser tests
29-
const file = require.resolve('mongodb');
29+
const file = require.resolve('mongodb');
3030
return require(file).ObjectID;
31-
}
32-
catch (e) {
31+
} catch (e) {
3332
return ObjectId; // if mongo is unavailable, e.g. browsers, just re-use BSON's
3433
}
3534
}
@@ -309,7 +308,9 @@ describe('Extended JSON', function() {
309308
serialized = EJSON.stringify(doc, replacerArray);
310309
expect(serialized).to.equal('{"a":10}');
311310

312-
var replacerFunc = function (key, value) { return key === 'b' ? undefined : value; }
311+
var replacerFunc = function(key, value) {
312+
return key === 'b' ? undefined : value;
313+
};
313314
serialized = EJSON.stringify(doc, replacerFunc, 0, { relaxed: false });
314315
expect(serialized).to.equal('{"a":{"$numberInt":"10"}}');
315316

test/node/object_id_tests.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ describe('ObjectId', function() {
102102

103103
it('should correctly interpret timestamps beyond 2038', function() {
104104
var farFuture = new Date('2040-01-01T00:00:00.000Z').getTime();
105-
expect(new BSON.ObjectId(BSON.ObjectId.generate(farFuture/1000)).getTimestamp().getTime()).to.equal(farFuture);
105+
expect(
106+
new BSON.ObjectId(BSON.ObjectId.generate(farFuture / 1000)).getTimestamp().getTime()
107+
).to.equal(farFuture);
106108
});
107109
});

0 commit comments

Comments
 (0)