* init biome * lint * format * unused vars * more unused vars * error fixes * import ordering * test precommit hook * add precommit hook * [autofix.ci] apply automated fixes * remove prettier and eslint and update gh actions * pre-commit update * ✨ (Makefile): add new targets 'biome' and 'biome_check' to run biome check and format on frontend code. * 🔧 (Makefile): rename 'biome' target to 'format_frontend' for clarity and consistency 🔧 (Makefile): rename 'biome_check' target to 'format_frontend_check' for clarity and consistency * 📝 (biome.json): Update a11y rule in biome.json to turn off 'noStaticElementInteractions' warning 🔧 (apiModal/code-tabs.tsx): Remove unused 'autologin' variable in APITabsComponent ♻️ (global-variable-modal.tsx): Simplify GeneralGlobalVariableModal component by removing unused props definition * 📝 (biome.json): Remove 'debug' from allowed console methods to improve code quality 🔧 (index.tsx): Replace console.debug with console.log for better logging consistency ♻️ (index.tsx): Refactor UpdateAllComponents function signature to remove unnecessary empty object parameter * fix console rules * 📝 (biome.json): update a11y rule to warn for noStaticElementInteractions to improve accessibility compliance. --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
name: Lint Frontend
|
|
|
|
on:
|
|
workflow_call:
|
|
workflow_dispatch:
|
|
inputs:
|
|
branch:
|
|
description: "(Optional) Branch to checkout"
|
|
required: false
|
|
type: string
|
|
|
|
|
|
env:
|
|
NODE_VERSION: "21"
|
|
|
|
jobs:
|
|
run-linters:
|
|
name: Run Biome
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ inputs.branch || github.ref }}
|
|
|
|
- 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 Biome
|
|
run: |
|
|
cd src/frontend
|
|
npx @biomejs/biome check --changed
|