Update model.ts #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
run: cat filtered.json | reviewdog -f=rdjson -reporter=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 |