Skip to content

Commit 851d5ee

Browse files
committed
Fix check-typescript script to use workspace type-check scripts
The check-typescript script was using invalid nps syntax: nps "build --noEmit" This doesn't work because: 1. There's no 'build' script in package-scripts.yml (only build.prepack) 2. nps doesn't support passing arguments to scripts this way Fixed by running the type-check script from each workspace package: - yarn workspace react-on-rails run type-check - yarn workspace react-on-rails-pro run type-check - yarn workspace react-on-rails-pro-node-renderer run type-check All three workspace packages already have type-check scripts that run tsc with --noEmit and --noErrorTruncation flags. Tested locally and passes successfully.
1 parent b9e887f commit 851d5ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

package-scripts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ scripts:
1515
script: nps lint && nps format.listDifferent && nps test && nps check-typescript
1616
check-typescript:
1717
description: Check for TypeScript errors
18-
script: nps "build --noEmit" && tsc --project ../packages/react-on-rails-pro-node-renderer/tests
18+
script: yarn workspace react-on-rails run type-check && yarn workspace react-on-rails-pro run type-check && yarn workspace react-on-rails-pro-node-renderer run type-check
1919

2020
lint:
2121
description: Run all linters (eslint, tsc)

0 commit comments

Comments
 (0)