Skip to content

Commit 474b2a9

Browse files
committed
test different approach
1 parent abb803c commit 474b2a9

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"parserOptions": {
1313
"ecmaVersion": 2021,
1414
"sourceType": "module",
15-
"project": ["./temp/tsconfig.json"]
15+
"project": ["temp/tsconfig.json"]
1616
},
1717
"env": {
1818
"node": true,

.github/workflows/docs-lint-and-validate.yaml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,22 @@ jobs:
3838
output_file: temp/extracted-code.ts
3939
block_number: 2 # Quickstart
4040

41+
- name: Setup module resolution for the temp directory
42+
run: |
43+
# Create package.json in temp directory
44+
cat > temp/package.json << EOF
45+
{
46+
"name": "temp",
47+
"version": "1.0.0",
48+
"description": "Temporary package for testing",
49+
"main": "index.js"
50+
}
51+
EOF
52+
53+
# Install firebolt-sdk in the temp directory
54+
cd temp
55+
npm install firebolt-sdk --no-save
56+
4157
- name: Create temporary tsconfig.json
4258
run: |
4359
cat > temp/tsconfig.json << EOF
@@ -54,17 +70,18 @@ jobs:
5470
"noUnusedLocals": true,
5571
"noUnusedParameters": true,
5672
"noImplicitReturns": true,
57-
"noFallthroughCasesInSwitch": true
73+
"noFallthroughCasesInSwitch": true,
74+
"moduleResolution": "node"
5875
},
5976
"include": ["*.ts"]
6077
}
6178
EOF
6279
63-
# - name: Check TypeScript compilation
64-
# run: npx tsc --noEmit --project temp/tsconfig.json
80+
- name: Check TypeScript compilation
81+
run: cd temp && npx tsc --noEmit --project tsconfig.json
6582

6683
- name: Lint extracted examples
67-
run: npx eslint temp/*.ts --config .eslintrc
84+
run: cd temp && npx eslint *.ts --config ../.eslintrc
6885

6986
- name: Clean up
7087
if: always()

0 commit comments

Comments
 (0)