This repository has been archived on 2022-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
2022-03-31 15:40:20 +00:00
|
|
|
# Define action name, description, and inputs
|
2022-04-05 13:43:46 +00:00
|
|
|
name: "JS Lint"
|
|
|
|
description: "Lint code with Prettier and eslint"
|
2022-03-31 15:40:20 +00:00
|
|
|
inputs:
|
|
|
|
working-directory:
|
|
|
|
required: false
|
|
|
|
description: "Working directory"
|
|
|
|
default: "."
|
|
|
|
|
|
|
|
# Define action steps
|
|
|
|
runs:
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
2022-04-06 19:09:36 +00:00
|
|
|
- uses: actions/setup-node@v3
|
2022-03-31 15:40:20 +00:00
|
|
|
with:
|
|
|
|
node-version: 16.x
|
|
|
|
- run: |
|
|
|
|
yarn
|
|
|
|
yarn prettier --check .
|
|
|
|
shell: bash
|
|
|
|
working-directory: ${{ inputs.working-directory }}
|
2022-04-04 17:43:54 +00:00
|
|
|
- if: inputs.working-directory == 'packages/dashboard'
|
|
|
|
run: yarn next lint
|
|
|
|
shell: bash
|
|
|
|
working-directory: ${{ inputs.working-directory }}
|
|
|
|
- if: inputs.working-directory == 'packages/dashboard-v2'
|
2022-03-31 15:40:20 +00:00
|
|
|
run: yarn lint
|
|
|
|
shell: bash
|
|
|
|
working-directory: ${{ inputs.working-directory }}
|