Add files via upload #40
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
# π Links: | |
# Source file: https://github.com/obytes/react-native-template-obytes/blob/master/.github/workflows/lint-ts.yml | |
# βοΈ Description: | |
# This action is used to run eslint checks | |
# Runs on pull requests and pushes to the main/master branches | |
# Based on the event type: | |
# - If it's a pull request, it will run eslint, then add the check to the PR as well as annotate the code with the errors and warnings. | |
# - If it's a push to main/master, it will run the type checking and fail if there are any errors. | |
# π¨ GITHUB SECRETS REQUIRED: NONE | |
name: Lint TS (eslint, prettier) | |
on: | |
push: | |
branches: [main, master] | |
pull_request: | |
branches: [main, master] | |
jobs: | |
lint: | |
name: Lint TS (eslint, prettier) | |
runs-on: ubuntu-latest | |
steps: | |
- name: π¦ Checkout project repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: π¦ Setup Node + PNPM + install deps | |
uses: ./.github/actions/setup-node-pnpm-install | |
- name: πββοΈ Run ESLint PR | |
if: github.event_name == 'pull_request' | |
uses: reviewdog/action-eslint@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
reporter: github-pr-review | |
eslint_flags: '. --ext .js,.jsx,.ts,.tsx' | |
- name: πββοΈ Run ESLint PR | |
if: github.event_name != 'pull_request' | |
run: pnpm run lint |