Skip to content

Commit 9750942

Browse files
authored
Merge pull request #42 from PhilanthropyDataCommons/noissue-repo-fixes
Fix a few repo bugs
2 parents 503e3f5 + 8601a2e commit 9750942

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
],
1111
"extends": [
1212
"plugin:@typescript-eslint/all",
13+
"airbnb-base",
1314
"airbnb-typescript/base"
1415
],
1516
"rules": {

jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module.exports = {
44
tsconfig: 'tsconfig.dev.json',
55
},
66
},
7+
collectCoverageFrom: ["src/**/*.ts"],
78
preset: 'ts-jest',
89
testEnvironment: 'node',
910
testPathIgnorePatterns: ["<rootDir>/dist/"],

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ app.listen(
1010
port,
1111
host,
1212
() => {
13-
console.log(`Server running on ${host}:${port}`);
13+
process.stdout.write(`Server running on ${host}:${port}\n`);
1414
},
1515
);

src/scripts/migrate.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import { migrate } from '../database';
22

3-
console.log('Starting migrations...');
3+
process.stdout.write('Starting migrations...\n');
44
migrate()
55
.then(() => {
6-
console.log('Migrations complete.');
6+
process.stdout.write('Migrations complete.\n');
77
process.exit();
88
})
9-
.catch((reason) => {
10-
console.log('Migrations failed!');
11-
console.log(reason);
9+
.catch((reason: unknown) => {
10+
process.stdout.write('Migrations failed!\n');
11+
if (reason instanceof Error) {
12+
process.stdout.write(`${reason.message}\n`);
13+
}
1214
process.exit(1);
1315
});

0 commit comments

Comments
 (0)