Skip to content

Commit 1b66495

Browse files
committed
style: lint code
1 parent 152c1c3 commit 1b66495

File tree

6 files changed

+14
-13
lines changed

6 files changed

+14
-13
lines changed

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"root": true,
33
"extends": ["@shelf/eslint-config/backend"],
44
"rules": {
5-
"no-console": 0
5+
"no-console": 0,
6+
"import/order": 0
67
}
78
}

jest-mongodb-config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
module.exports = {
22
mongodbMemoryServerOptions: {
33
binary: {
4-
skipMD5: true
4+
skipMD5: true,
55
},
66
autoStart: false,
7-
instance: {}
7+
instance: {},
88
},
9-
mongoURLEnvName: 'MONGO_URL'
9+
mongoURLEnvName: 'MONGO_URL',
1010
};

jest-preset.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ const {resolve} = require('path');
33
module.exports = {
44
globalSetup: resolve(__dirname, './setup.js'),
55
globalTeardown: resolve(__dirname, './teardown.js'),
6-
testEnvironment: resolve(__dirname, './environment.js')
6+
testEnvironment: resolve(__dirname, './environment.js'),
77
};

mongo-aggregate.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ describe('insert', () => {
99
beforeAll(async () => {
1010
connection = await MongoClient.connect(uri, {
1111
useNewUrlParser: true,
12-
useUnifiedTopology: true
12+
useUnifiedTopology: true,
1313
});
1414
db = await connection.db();
1515
});
@@ -27,7 +27,7 @@ describe('insert', () => {
2727
{type: 'Image'},
2828
{type: 'Document'},
2929
{type: 'Image'},
30-
{type: 'Document'}
30+
{type: 'Document'},
3131
]);
3232

3333
const topFiles = await files
@@ -37,7 +37,7 @@ describe('insert', () => {
3737
expect(topFiles).toEqual([
3838
{_id: 'Document', count: 3},
3939
{_id: 'Image', count: 2},
40-
{_id: 'Video', count: 1}
40+
{_id: 'Video', count: 1},
4141
]);
4242
});
4343
});

mongo-insert.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ describe('insert', () => {
99
beforeAll(async () => {
1010
connection = await MongoClient.connect(uri, {
1111
useNewUrlParser: true,
12-
useUnifiedTopology: true
12+
useUnifiedTopology: true,
1313
});
1414
db = await connection.db();
1515
});
@@ -40,7 +40,7 @@ describe('insert', () => {
4040
expect(insertedUsers).toEqual([
4141
expect.objectContaining({name: 'John'}),
4242
expect.objectContaining({name: 'Alice'}),
43-
expect.objectContaining({name: 'Bob'})
43+
expect.objectContaining({name: 'Bob'}),
4444
]);
4545
});
4646
});

setup.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = async () => {
1818

1919
const mongoConfig = {
2020
mongoUri: await mongod.getUri(),
21-
mongoDBName: options.instance.dbName
21+
mongoDBName: options.instance.dbName,
2222
};
2323

2424
// Write global config to disk because all tests run in different contexts.
@@ -38,10 +38,10 @@ function getMongodbMemoryOptions() {
3838
} catch (e) {
3939
return {
4040
binary: {
41-
skipMD5: true
41+
skipMD5: true,
4242
},
4343
autoStart: false,
44-
instance: {}
44+
instance: {},
4545
};
4646
}
4747
}

0 commit comments

Comments
 (0)