Skip to content

Commit 60c35df

Browse files
authored
fix: Always fail lint-typescript/tsc job when typecheck fails (#1253)
* fix: always fail `tsc` job when typecheck fails * fix: TS errors after pipeline fails again @mrousavy let me know if this fix is correct
1 parent abc6a84 commit 60c35df

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/lint-typescript.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ jobs:
4545

4646
- name: Run TypeScript (tsc)
4747
run: |
48-
bun typecheck | reviewdog -name="tsc" -efm="%f(%l,%c): error TS%n: %m" -reporter="github-pr-review" -filter-mode="nofilter" -fail-on-error -tee
48+
set -o pipefail
49+
bun typecheck | reviewdog -name="tsc" -efm="%f(%l,%c): error TS%n: %m" -reporter="github-pr-review" -filter-mode="nofilter" -fail-level=error -tee
4950
env:
5051
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5152

example/src/logPrototypeChain.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
import type { HybridObject } from 'react-native-nitro-modules'
1+
import type {
2+
HybridObject,
3+
type PlatformSpec,
4+
} from 'react-native-nitro-modules'
25

36
function dim(string: string): string {
47
return `\x1b[2m${string}\x1b[0m`
58
}
69

7-
export function logPrototypeChain(type: HybridObject): void {
10+
export function logPrototypeChain<Platforms extends PlatformSpec>(
11+
type: HybridObject<Platforms>
12+
): void {
813
console.log(`Prototype chain of ${type.name}:`)
914
let object = type
1015
let indentation = ' '

0 commit comments

Comments
 (0)