Skip to content

Commit

Permalink
ci: generate JSON schema types prior to linting code
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
clydin committed Jun 25, 2024
1 parent fb24847 commit 53dd9a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@14fe7bcc5313c4920fbb699af1824b63740e8e34
- name: Install node modules
run: yarn install --immutable
- name: Generate JSON schema types
# Schema types are required to correctly lint the TypeScript code
run: yarn admin build-schema
- name: Run ESLint
run: yarn lint --cache-strategy content
- name: Validate NgBot Configuration
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
key: ${{ runner.os }}-${{ hashFiles('.eslintrc.json') }}
- name: Install node modules
run: yarn install --immutable
- name: Generate JSON schema types
# Schema types are required to correctly lint the TypeScript code
run: yarn admin build-schema
- name: Run ESLint
run: yarn lint --cache-strategy content
- name: Validate NgBot Configuration
Expand Down

0 comments on commit 53dd9a2

Please sign in to comment.