Skip to content

Conversation

koszti
Copy link
Member

@koszti koszti commented May 4, 2025

Description

This PR introduces standardized code formatting by adding .prettierrc and .eslintrc.cjs files, using the same style rules and npm targets (such as check, lint) as the main Trino Preview UI codebase. This ensures consistent code style across both codebases.

Additional context and related issues

All existing files have been reformatted to align with the new style rules. This PR contains only formatting changes and no new functionality or behavioral changes are introduced.

@koszti koszti force-pushed the code-format branch 4 times, most recently from b8e7c99 to 3c13302 Compare May 4, 2025 10:02
Copy link
Member

@mosabua mosabua left a comment

Choose a reason for hiding this comment

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

Looks good. Please update the commit message to something like

Reformat source code for consistent style

* Enable eslint and prettier config for validation during build
* No functional code changes, source code format only

Also maybe add info about this command to the readme file so developers know without looking at gha definition.

@mosabua
Copy link
Member

mosabua commented May 4, 2025

Thoughts @nineinchnick @wendigo @georgewfisher ?

@koszti koszti changed the title Add eslint and prettier configs and refactor codebase to match style rules Reformat source code for consistent style May 4, 2025
Copy link

@wendigo wendigo left a comment

Choose a reason for hiding this comment

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

I've reviewed configuration for prettier + workflow + ignore files.

I'd extract the automatic changes to a separate commit.

koszti added 2 commits May 4, 2025 20:59
* Enable eslint and prettier config for validation during build
* No functional code changes, source code format only
@koszti
Copy link
Member Author

koszti commented May 4, 2025

@mosabua added instructions to README.md and updated commit message

@wendigo I’ve split the updates into two separate commits:

  1. eslint and prettier configuration, plus the README update.
  2. auto code formatting changes and enabling GHA auto check

wdyt, can this be merged?

@mosabua
Copy link
Member

mosabua commented May 4, 2025

Looks good to me. Merging.

@mosabua mosabua merged commit 4ed1f00 into trinodb:main May 4, 2025
2 checks passed
@koszti koszti deleted the code-format branch May 4, 2025 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants