mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 04:04:14 +00:00
chore: Add UI linter back (#3230)
# What does this PR do? 1. Adds `scripts/run-ui-linter.sh` - Light script that checks whether `node_modules`,`eslint`, and `prettier` exist before running linter - When I introduced [the linter for the UI](https://github.com/llamastack/llama-stack/pull/3156/files#diff-63a9c44a44acf85fea213a857769990937107cf072831e1a26808cfde9d096b9) it forced the UI linter on all users, the small `node_modules` check means that only users that have installed the UI locally (since `node_modules` is in the gitignore) will actually end up having this run. Additionally this does not do any install and just runs the existing linter/prettier as requested by @mattf 2. Updates `.github/workflows/pre-commit.yml` to run CI again - When I introduced the UI linter in the CI [in this PR](https://github.com/llamastack/llama-stack/pull/3191) a failure occurred because dependabot needed to be updated to also bump the `package-lock.json` which was done [in this PR](https://github.com/llamastack/llama-stack/pull/3212). All of this to say, we shouldn't observe failures from dependabot again. 3. Updates `.pre-commit-config.yaml` - Calls `scripts/run-ui-linter.sh` ## AI Assistance Notice I used Copilot minimally. ## Test Plan As [requested](https://github.com/llamastack/llama-stack/pull/3207#discussion_r2288004872) by @mattf I ran this after removing all of my `node_modules` and the linter passed. Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
parent
f520e244d9
commit
b0797e4982
3 changed files with 33 additions and 38 deletions
22
.github/workflows/pre-commit.yml
vendored
22
.github/workflows/pre-commit.yml
vendored
|
@ -36,20 +36,16 @@ jobs:
|
|||
**/requirements*.txt
|
||||
.pre-commit-config.yaml
|
||||
|
||||
# npm ci may fail -
|
||||
# npm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
|
||||
# npm error Invalid: lock file's llama-stack-client@0.2.17 does not satisfy llama-stack-client@0.2.18
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: 'llama_stack/ui/'
|
||||
|
||||
# - name: Set up Node.js
|
||||
# uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
# with:
|
||||
# node-version: '20'
|
||||
# cache: 'npm'
|
||||
# cache-dependency-path: 'llama_stack/ui/'
|
||||
|
||||
# - name: Install npm dependencies
|
||||
# run: npm ci
|
||||
# working-directory: llama_stack/ui
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
working-directory: llama_stack/ui
|
||||
|
||||
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
|
||||
continue-on-error: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue