* chore: Update chardet package to version 5.2.0 * chore: Update Docker build workflow to support multiple platforms and add container testing * chore: Update pre-release workflow to include CLI testing * chore: Update npm install command in lint-js.yml workflow * chore: Update eslint and prettier versions in package.json * fix: remove .mdx from link in docs * Merge remote-tracking branch 'origin/dev' into update
53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
name: Lint Frontend
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "src/frontend/**"
|
|
|
|
env:
|
|
NODE_VERSION: "21"
|
|
|
|
jobs:
|
|
run-linters:
|
|
name: Run linters
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
id: setup-node
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
|
|
- name: Cache Node.js dependencies
|
|
uses: actions/cache@v4
|
|
id: npm-cache
|
|
with:
|
|
path: ~/.npm
|
|
key: ${{ runner.os }}-node-${{ hashFiles('src/frontend/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node-
|
|
|
|
- name: Install Node.js dependencies
|
|
run: |
|
|
cd src/frontend
|
|
npm install
|
|
if: ${{ steps.setup-node.outputs.cache-hit != 'true' }}
|
|
|
|
- name: Run linters
|
|
uses: wearerequired/lint-action@v2
|
|
with:
|
|
github_token: ${{ secrets.github_token }}
|
|
auto_fix: true
|
|
git_email: "gabriel@langflow.org"
|
|
# Enable linters
|
|
# eslint: true
|
|
# eslint_auto_fix: true
|
|
prettier: true
|
|
prettier_auto_fix: true
|
|
prettier_args: '--write \"{tests,src}/**/*.{js,jsx,ts,tsx,json,md}\" --ignore-path .prettierignore'
|
|
|