Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

require eslint for PRs #4391

Merged
merged 17 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/lint-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Lint App

on: workflow_call

jobs:
eslint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "16"

- name: Cache Node Modules
id: node-cache
uses: actions/cache@v3
with:
path: |
app/node_modules
app/.yarn/cache
key: node-modules-${{ hashFiles('app/yarn.lock') }}

- name: Install Dependencies
if: steps.node-cache.outputs.cache-hit != 'true'
run: cd app && yarn install

- name: Read ESLint Packages List and Lint
run: |
cd app
ESLINT_PACKAGES=$(grep -v '^#' ./eslint-packages.txt | xargs)
yarn eslint $ESLINT_PACKAGES --max-warnings=0
13 changes: 13 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ on:
- release/v[0-9]+.[0-9]+.[0-9]+

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
changes:
- 'app/**'
- if: steps.changes.outputs.changes == 'true'
uses: ./.github/workflows/lint-app.yml

build:
uses: ./.github/workflows/build.yml

Expand Down
3 changes: 3 additions & 0 deletions app/eslint-packages.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# require these paths to pass linting
# for PRs to be merge-able
packages/operators
Loading