Skip to content

Conversation

@elliot-barn
Copy link
Contributor

@elliot-barn elliot-barn commented Oct 15, 2025

adding eslint and prettier script to precommit before getting rid of format.sh

1 step closer to replacing scripts/format.sh with pre-commit (pre-commit is currently missing eslint)

tested locally:
image

cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a pre-commit hook to run eslint and prettier on the dashboard client code. While this is a good step towards automated formatting checks, the current implementation of the hook has several performance and correctness issues. I've left a comment with suggestions to improve the hook's efficiency and fix its file matching. The main concerns are that the hook runs npm ci on every commit and lints all files instead of just the changed ones, which will be very slow.

@ray-gardener ray-gardener bot added core Issues that should be addressed in Ray Core devprod labels Oct 15, 2025
@elliot-barn elliot-barn marked this pull request as draft October 15, 2025 01:45
@elliot-barn elliot-barn changed the title including eslint prettier in pre-commit including eslint in pre-commit Oct 15, 2025
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

testing eslint and prettier

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

updating pre commit

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

new comment

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

lint

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

linting

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

testing lint

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

updating pre-commit

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

testing lint

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

updating file regex

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

hold the door

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

adding eslint to precommit array

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

updating lint

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

testing linter

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

updating pre commit

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

testing eslint

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

updating pre-commit

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

updating app.tsx

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

updating pre commit

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

updating pre commit

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

adding a comment

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

testing eslint

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

testing es lint

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

adding typescript eslint

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

updating pre-commit-config

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

updating empty objects

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

testing

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

testing

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

udpating pre -commit

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

testing

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

updating pre commit

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

testing eslint

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

updating pre commit

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

updating eslint

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

run the test

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

testing precommit

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

running test

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

testing eslint

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

updating pre commit

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

testing lint

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

updating pre-commit

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

updating app.tsx

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

testing eslint

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

testing app.tsx

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>

updating app.tsx

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
@elliot-barn elliot-barn force-pushed the elliot-barn/lintupdates branch from 79442c9 to 4197b85 Compare October 15, 2025 23:57
@elliot-barn elliot-barn marked this pull request as ready for review October 15, 2025 23:57
@elliot-barn elliot-barn requested a review from aslonnie October 15, 2025 23:57
cursor[bot]

This comment was marked as outdated.

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
cursor[bot]

This comment was marked as outdated.

@aslonnie aslonnie changed the title including eslint in pre-commit [ci] including eslint in pre-commit Oct 16, 2025
@aslonnie
Copy link
Collaborator

cc @alanwguo

Copy link
Collaborator

@aslonnie aslonnie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems that the new lint is failing on CI.

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
cursor[bot]

This comment was marked as outdated.

@aslonnie aslonnie added the go add ONLY when ready to merge, run all tests label Oct 17, 2025
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
@alanwguo alanwguo requested a review from cristianjd October 17, 2025 21:30
Copy link
Contributor

@alanwguo alanwguo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@elliot-barn elliot-barn requested a review from aslonnie October 18, 2025 01:32
- '@typescript-eslint/parser@5.41.0'
- '@typescript-eslint/eslint-plugin@5.41.0'
- '@typescript-eslint/parser@5.41.0'
- '@typescript-eslint/eslint-plugin@5.41.0'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Duplicate ESLint Dependencies in Pre-commit Hook

The eslint pre-commit hook's additional_dependencies list contains duplicate entries for @typescript-eslint/parser and @typescript-eslint/eslint-plugin, which appears to be a copy-paste error.

Fix in Cursor Fix in Web

@aslonnie aslonnie merged commit 5b426c7 into master Oct 18, 2025
6 checks passed
@aslonnie aslonnie deleted the elliot-barn/lintupdates branch October 18, 2025 04:34
justinyeh1995 pushed a commit to justinyeh1995/ray that referenced this pull request Oct 20, 2025
adding eslint and prettier script to precommit before getting rid of
format.sh

1 step closer to replacing scripts/format.sh with pre-commit (pre-commit
is currently missing eslint)

tested locally: 
<img width="898" height="929" alt="image"
src="https://github.com/user-attachments/assets/58c77fb7-bdde-47ae-ac2b-b864334b3f30"
/>

---------

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
xinyuangui2 pushed a commit to xinyuangui2/ray that referenced this pull request Oct 22, 2025
adding eslint and prettier script to precommit before getting rid of
format.sh

1 step closer to replacing scripts/format.sh with pre-commit (pre-commit
is currently missing eslint)

tested locally:
<img width="898" height="929" alt="image"
src="https://github.com/user-attachments/assets/58c77fb7-bdde-47ae-ac2b-b864334b3f30"
/>

---------

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
Signed-off-by: xgui <xgui@anyscale.com>
elliot-barn added a commit that referenced this pull request Oct 23, 2025
adding eslint and prettier script to precommit before getting rid of
format.sh

1 step closer to replacing scripts/format.sh with pre-commit (pre-commit
is currently missing eslint)

tested locally: 
<img width="898" height="929" alt="image"
src="https://github.com/user-attachments/assets/58c77fb7-bdde-47ae-ac2b-b864334b3f30"
/>

---------

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
landscapepainter pushed a commit to landscapepainter/ray that referenced this pull request Nov 17, 2025
adding eslint and prettier script to precommit before getting rid of
format.sh

1 step closer to replacing scripts/format.sh with pre-commit (pre-commit
is currently missing eslint)

tested locally: 
<img width="898" height="929" alt="image"
src="https://github.com/user-attachments/assets/58c77fb7-bdde-47ae-ac2b-b864334b3f30"
/>

---------

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
Aydin-ab pushed a commit to Aydin-ab/ray-aydin that referenced this pull request Nov 19, 2025
adding eslint and prettier script to precommit before getting rid of
format.sh

1 step closer to replacing scripts/format.sh with pre-commit (pre-commit
is currently missing eslint)

tested locally:
<img width="898" height="929" alt="image"
src="https://github.com/user-attachments/assets/58c77fb7-bdde-47ae-ac2b-b864334b3f30"
/>

---------

Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
Signed-off-by: Aydin Abiar <aydin@anyscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core devprod go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants