Skip to content

Update model.ts

Update model.ts #24

Workflow file for this run

name: "eslint"
on: [push]
jobs:
eslint:
name: runner / eslint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- uses: actions/setup-node@v2
with:
node-version: 19
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0.0'
bundler-cache: true
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Building gitdiff
run: |
mvn install -f gitdiff
- name: Running gitdiff
run: java -jar gitdiff/target/gitdiff-0.1.jar > gitdiff/gitdiff.yaml
- name: Install npm dependencies
run: npm i --force # OR: yarn
- name: Running eslint
run: npx eslint $(git diff --name-only HEAD^ | grep -E '\.(ts|tsx)$' | xargs) --format json > eslinted.json || true
- name: Running filter
run: ruby gitdiff/filter_diff.rb gitdiff/gitdiff.yaml eslinted.json > filtered.json
- uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest
- name: Running reviewdog
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: cat filtered.json | reviewdog -f=rdjson -reporter=github-check
# github-pr-review
# - name: Annotate
# uses: actions/annotations
# # - name: Adding annotations
# - name: Install dependencies
# run: npm i --force # OR: yarn
# - name: Install other deps
# run: npm install --force --save-dev eslint-plugin-n@latest
# - name: Run eslint on changed files
# uses: tj-actions/eslint-changed-files@v20
# with:
# config_path: ".eslintrc.yml"
# fail_on_error: false
# file_extensions: |
# **/*.ts
# **/*.tsx