fix(ui): ESLint fixes#25726
Closed
johallar wants to merge 7 commits into
Closed
Conversation
This was referenced Oct 7, 2025
yhwang
pushed a commit
that referenced
this pull request
Oct 14, 2025
…6281) ## Description <!---Describe your changes in detail--> For developer + codebase life improvements, adding ESLint with prettier, react + react hooks, and flow plugins. ## Motivation and Context <!---Why is this change required? What problem does it solve?--> <!---If it fixes an open issue, please link to the issue here.--> * Improve the code quality and consistency, improves developer QOL * Implements feature mentioned in #21062 (comment) ## Impact <!---Describe any public API or user-facing feature change or any performance impact--> * There will be a large number of line changes once all files are linted, but no functional impact. > Note: All lint rules are up for discussion if folks on the project have strong feelings about tab spacing, semicolons, etc. This mostly implements the "recommended" rules for react, hooks, prettier formatting, and flow * Only impacts dev dependencies * Adds commands to package.json to lint, lint+fix, format, format+fix ## Follow up 1. Add ESLint + prettier config/packages (this PR) 2. Format all UI files, add eslint to CI build process 3. Convert flow -> typescript, add typescript-eslint, remove flow eslint plugins ## Test Plan <!---Please fill in how you tested your change--> For now this simply adds the dependencies, and implements an eslint/prettier configuration that works. No files have been linted or formatted yet. I plan to do this in a follow up to keep this PR manageable, first draft of linting all files here: #25726 Test the eslint config by running `yarn run lint` for eslint changes, or `yarn run format` for just prettier formatting changes ## Contributor checklist - [x] Please make sure your submission complies with our [contributing guide](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md), in particular [code style](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#code-style) and [commit standards](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#commit-standards). - [x] PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced. - [ ] Documented new properties (with its default value), SQL syntax, functions, or other functionality. - [ ] If release notes are required, they follow the [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines). - [ ] Adequate tests were added if applicable. - [ ] CI passed. ## Release Notes Please follow [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines) and fill in the release notes below. ``` == NO RELEASE NOTE == ```
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes all eslint errors, either automatically, or by using inline ignores for the time being.
Note: This includes both auto-fixed errors, and manually fixed errors by me. If preferable, I could split this into two PRs, one with the auto fixed errors (should be 100% safe), and one with the manually fixed errors (may need a more detailed review).
Motivation and Context
Lint rules for the UI's various frameworks were added in #25716
Impact
This should establish a baseline of consistency for code style/correctness, and will enable the project to enforce lint rules going forward.
Test Plan
Running
yarn lintwith no errors (warnings only) is a successful testContributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.