You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 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](#3191) a failure
occurred because dependabot needed to be updated to also bump the
`package-lock.json` which was done [in this
PR](#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](#3207 (comment))
by @mattf I ran this after removing all of my `node_modules` and the
linter passed.
Signed-off-by: Francisco Javier Arceo <[email protected]>
Copy file name to clipboardExpand all lines: .github/workflows/pre-commit.yml
+10-14Lines changed: 10 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -36,20 +36,16 @@ jobs:
36
36
**/requirements*.txt
37
37
.pre-commit-config.yaml
38
38
39
-
# npm ci may fail -
40
-
# 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.
Copy file name to clipboardExpand all lines: .pre-commit-config.yaml
+7-25Lines changed: 7 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -146,31 +146,13 @@ repos:
146
146
pass_filenames: false
147
147
require_serial: true
148
148
files: ^.github/workflows/.*$
149
-
# ui-prettier and ui-eslint are disabled until we can avoid `npm ci`, which is slow and may fail -
150
-
# 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.
0 commit comments