Skip to content

Commit 53dd9a2

Browse files
committed
ci: generate JSON schema types prior to linting code
The TypeScript eslint rules require full type information to accurately lint the code. Without the type definitions for the imported schemas, some rules can generate false positives such as `@typescript-eslint/no-unnecessary-type-assertion`.
1 parent fb24847 commit 53dd9a2

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ jobs:
2424
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14fe7bcc5313c4920fbb699af1824b63740e8e34
2525
- name: Install node modules
2626
run: yarn install --immutable
27+
- name: Generate JSON schema types
28+
# Schema types are required to correctly lint the TypeScript code
29+
run: yarn admin build-schema
2730
- name: Run ESLint
2831
run: yarn lint --cache-strategy content
2932
- name: Validate NgBot Configuration

.github/workflows/pr.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ jobs:
4242
key: ${{ runner.os }}-${{ hashFiles('.eslintrc.json') }}
4343
- name: Install node modules
4444
run: yarn install --immutable
45+
- name: Generate JSON schema types
46+
# Schema types are required to correctly lint the TypeScript code
47+
run: yarn admin build-schema
4548
- name: Run ESLint
4649
run: yarn lint --cache-strategy content
4750
- name: Validate NgBot Configuration

0 commit comments

Comments
 (0)