Skip to content

Conversation

@johallar
Copy link
Contributor

@johallar johallar commented Aug 8, 2025

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 lint with no errors (warnings only) is a successful test

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • 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.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== NO RELEASE NOTES ==

@johallar johallar changed the title [ui] ESLint Fixes fix(ui): eslint fixes Oct 1, 2025
@johallar johallar changed the title fix(ui): eslint fixes fix(ui): ESLint fixes Oct 1, 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 ==
```
@johallar
Copy link
Contributor Author

Will re-open once #25666 #25759 and #25904 are in

@johallar johallar closed this Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant