Skip to content

Commit 1c2537e

Browse files
authored
fix(ts): update config (#3)
1 parent 8edf247 commit 1c2537e

File tree

3 files changed

+68
-8
lines changed

3 files changed

+68
-8
lines changed

.github/workflows/nodejs.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# CI/CD Release Workflow
2+
name: nodejs
3+
4+
on:
5+
push:
6+
7+
env:
8+
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
9+
PULL_NUMBER: ${{ github.event.pull_request.number }}
10+
RUN_ID: ${{ github.run_id }}
11+
FORCE_COLOR: 2
12+
13+
jobs:
14+
pipeline:
15+
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
16+
runs-on: ${{ matrix.os }}
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
node-version: ['16.x']
22+
os: ['ubuntu-latest']
23+
24+
steps:
25+
- uses: actions/checkout@v3
26+
- name: Use Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
31+
- name: Get yarn cache directory path
32+
id: yarn-cache-dir-path
33+
run: echo "::set-output name=dir::$(yarn cache dir)"
34+
35+
- uses: actions/cache@v3
36+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
37+
with:
38+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
39+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
40+
restore-keys: |
41+
${{ runner.os }}-yarn-
42+
43+
- name: Install project
44+
run: yarn --prefer-offline
45+
id: install
46+
47+
- name: Build project
48+
run: yarn run build
49+
id: production

.github/workflows/pipeline.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: pipeline
33

44
on:
55
pull_request:
6-
branches:
7-
- 'trunk'
86
tags-ignore:
97
- '*'
108
push:

tsconfig.json

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,36 @@
22
"compilerOptions": {
33
"allowSyntheticDefaultImports": false,
44
"esModuleInterop": false,
5+
"forceConsistentCasingInFileNames": true,
6+
"noFallthroughCasesInSwitch": true,
7+
"removeComments": true,
8+
"incremental": true,
9+
"tsBuildInfoFile": "./",
510
"preserveValueImports": true,
611
"emitDecoratorMetadata": true,
712
"experimentalDecorators": true,
813
"allowUnreachableCode": false,
9-
"strictFunctionTypes": true,
14+
"strictPropertyInitialization": true,
15+
"strictNullChecks": true,
16+
"strictFunctionTypes": true,
1017
"isolatedModules": true,
1118
"declaration": true,
1219
"sourceMap": false,
1320
"module": "ES2020",
1421
"moduleResolution": "node",
1522
"target": "ESNext",
16-
"rootDir": "src",
17-
"outDir": "dist",
18-
"types" : ["@types/node/events"]
23+
"rootDir": "./src",
24+
"outDir": "./dist",
25+
"types": [
26+
"@types/node/events"
27+
]
1928
},
2029
"include": [
21-
"src"
30+
"src/**/*.ts"
2231
],
23-
"exclude": ["**/node_modules", "**/.*/"],
32+
"exclude": [
33+
"**/node_modules",
34+
"**/.*/",
35+
"src/**/*.test.ts"
36+
]
2437
}

0 commit comments

Comments
 (0)