Skip to content

Commit e47faae

Browse files
committed
Configured typescript and lint to allow build without running it on each package
1 parent f244571 commit e47faae

File tree

12 files changed

+49
-26
lines changed

12 files changed

+49
-26
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"parserOptions": {
1717
"ecmaVersion": 2023,
1818
"sourceType": "module",
19-
"project": "tsconfig.json"
19+
"project": "./tsconfig.json"
2020
},
2121
"rules": {
2222
"no-unused-vars": "off",

docs/snippets/gettingStarted/businessLogic.unit.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-floating-promises */
12
import { describe, it } from 'node:test';
23
import { v4 as uuid } from 'uuid';
34
import { decide } from './businessLogic';

docs/snippets/gettingStarted/state.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export type EmptyShoppingCart = {
77

88
export type OpenedShoppingCart = {
99
status: 'Opened';
10+
1011
productItems: ProductItems;
1112
};
1213

package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"scripts": {
99
"setup": "cat .nvmrc | nvm install; nvm use",
1010
"build": "npm run build --ws",
11-
"build:ts": "npm run build:ts --ws",
12-
"build:ts:watch": "npm run build:ts:watch --ws",
11+
"build:ts": "tsc -b",
12+
"build:ts:watch": "tsc -b --watch",
1313
"lint": "npm run lint --ws",
1414
"fix": "npm run fix --ws",
1515
"test": "run-s test:unit test:int test:e2e",
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
4-
"composite": false
4+
"composite": false,
5+
"paths": {}
56
}
67
}

packages/emmett-esdb/tsconfig.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
{
22
"extends": "../../tsconfig.shared.json",
3-
"include": ["./src/**/*", "./tsup.config.ts"],
3+
"include": ["./src/**/*"],
44
"compilerOptions": {
5-
"composite": true
6-
}
5+
"composite": true,
6+
"outDir": "./dist" /* Redirect output structure to the directory. */,
7+
"rootDir": "./src",
8+
"paths": {
9+
"@event-driven-io/emmett": ["../emmett"]
10+
}
11+
},
12+
"references": [
13+
{
14+
"path": "../emmett/"
15+
}
16+
]
717
}

packages/emmett-expressjs/src/etag.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ export const enum ETagErrors {
2323
}
2424

2525
export const isWeakETag = (etag: ETag): etag is WeakETag => {
26-
return WeakETagRegex.test(etag);
26+
return WeakETagRegex.test(etag as string);
2727
};
2828

2929
export const getWeakETagValue = (etag: ETag): string => {
30-
const result = WeakETagRegex.exec(etag);
30+
const result = WeakETagRegex.exec(etag as string);
3131
if (result === null || result.length === 0) {
3232
throw new Error(ETagErrors.WRONG_WEAK_ETAG_FORMAT);
3333
}
@@ -59,5 +59,5 @@ export const getETagFromIfNotMatch = (request: Request): ETag => {
5959
};
6060

6161
export const setETag = (response: Response, etag: ETag): void => {
62-
response.setHeader(HeaderNames.ETag, etag);
62+
response.setHeader(HeaderNames.ETag, etag as string);
6363
};
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
{
22
"extends": "../../tsconfig.shared.json",
3-
"include": ["./src/**/*", "./tsup.config.ts"],
3+
"include": ["./src/**/*"],
44
"compilerOptions": {
55
"composite": true,
6+
"outDir": "./dist" /* Redirect output structure to the directory. */,
7+
"rootDir": "./src",
68
"paths": {
7-
"@event-driven-io/emmett": ["./packages/emmett/src"]
9+
"@event-driven-io/emmett": ["./packages/emmett"]
810
}
9-
}
11+
},
12+
"references": [
13+
{
14+
"path": "../emmett/"
15+
}
16+
]
1017
}

packages/emmett/tsconfig.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
22
"extends": "../../tsconfig.shared.json",
3-
"include": ["./src/**/*", "./tsup.config.ts"],
3+
"include": ["./src/**/*"],
44
"compilerOptions": {
5-
"composite": true
5+
"composite": true,
6+
"outDir": "./dist" /* Redirect output structure to the directory. */,
7+
"rootDir": "./src"
68
}
79
}

0 commit comments

Comments
 (0)