This is an automated email from the ASF dual-hosted git repository.

lauraxia pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/main by this push:
     new 2d931ca097 [#1836] fix(web): remove duplicate trailingComma in 
.prettierrc.js (#7150)
2d931ca097 is described below

commit 2d931ca0973ee9b041f94e5b2a5642e48ddb9a4f
Author: Drinkaiii <[email protected]>
AuthorDate: Tue May 13 15:08:22 2025 +0900

    [#1836] fix(web): remove duplicate trailingComma in .prettierrc.js (#7150)
    
    ### What changes were proposed in this pull request?
    
    - Removed the duplicate `trailingComma` entry from `.prettierrc.js`.
    - Re-ran formatting to apply the updated configuration.
    
    ### Why are the changes needed?
    
    - Fixes #1836: Prettier’s `trailingComma` was defined twice, causing
    ambiguity.
    
    ### Does this PR introduce *any* user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    - Ran `pnpm prettier . --check`
    - Executed `./gradlew spotlessCheck`
    - Built via `./gradlew clean build`
    
    After modifying the `.prettierrc.js` file, I checked the formatting and
    found that 58 files needed to be reformatted.
    
    ```bash
    ubuntu@ip-172-31-38-116:~/gravitino/web/web$ pnpm prettier:check
    
    > gravitino-web@ prettier:check /home/ubuntu/gravitino/web/web
    > prettier --check .
    
    Checking formatting...
    [warn] .eslintrc.js
    [warn] next.config.js
    [warn] postcss.config.js
    [warn] src/app/layout.js
    [warn] src/app/login/page.js
    [warn] src/app/metalakes/CreateMetalakeDialog.js
    [warn] src/app/metalakes/metalake/MetalakePageLeftBar.js
    [warn] src/app/metalakes/metalake/MetalakeTree.js
    [warn] src/app/metalakes/metalake/MetalakeView.js
    [warn] src/app/metalakes/metalake/rightContent/CreateCatalogDialog.js
    [warn] src/app/metalakes/metalake/rightContent/CreateFilesetDialog.js
    [warn] src/app/metalakes/metalake/rightContent/CreateSchemaDialog.js
    [warn] src/app/metalakes/metalake/rightContent/CreateTableDialog.js
    [warn] src/app/metalakes/metalake/rightContent/CreateTopicDialog.js
    [warn] src/app/metalakes/metalake/rightContent/LinkVersionDialog.js
    [warn] src/app/metalakes/metalake/rightContent/MetalakePath.js
    [warn] src/app/metalakes/metalake/rightContent/RegisterModelDialog.js
    [warn] src/app/metalakes/metalake/rightContent/RightContent.js
    [warn] 
src/app/metalakes/metalake/rightContent/tabsContent/detailsView/DetailsView.js
    [warn] 
src/app/metalakes/metalake/rightContent/tabsContent/tableView/TableView.js
    [warn] src/app/metalakes/metalake/rightContent/tabsContent/TabsContent.js
    [warn] src/app/metalakes/page.js
    [warn] src/app/metalakes/TableBody.js
    [warn] src/app/rootLayout/AppBar.js
    [warn] src/app/rootLayout/Layout.js
    [warn] src/app/rootLayout/ScrollToTop.js
    [warn] src/components/DetailsDrawer.js
    [warn] src/components/StyledToast.js
    [warn] src/configs/themeConfig.js
    [warn] src/lib/api/auth/index.js
    [warn] src/lib/api/catalogs/index.js
    [warn] src/lib/api/filesets/index.js
    [warn] src/lib/api/github/index.js
    [warn] src/lib/api/metalakes/index.js
    [warn] src/lib/api/models/index.js
    [warn] src/lib/api/schemas/index.js
    [warn] src/lib/api/tables/index.js
    [warn] src/lib/api/topics/index.js
    [warn] src/lib/api/version/index.js
    [warn] src/lib/enums/columnTypeEnum.js
    [warn] src/lib/enums/httpEnum.js
    [warn] src/lib/icons/iconify-icons.js
    [warn] src/lib/provider/emotion.js
    [warn] src/lib/provider/session.js
    [warn] src/lib/settings/index.js
    [warn] src/lib/store/auth/index.js
    [warn] src/lib/store/index.js
    [warn] src/lib/store/metalakes/index.js
    [warn] src/lib/store/sys/index.js
    [warn] src/lib/theme/colors.js
    [warn] src/lib/theme/mui.js
    [warn] src/lib/theme/screens.js
    [warn] src/lib/theme/tailwind.js
    [warn] src/lib/utils/axios/Axios.js
    [warn] src/lib/utils/axios/index.js
    [warn] src/lib/utils/index.js
    [warn] src/lib/utils/initial.js
    [warn] tailwind.config.js
    [warn] Code style issues found in 58 files. Run Prettier with --write to 
fix.
     ELIFECYCLE  Command failed with exit code 1.
    ```
    I resolved this by running `pnpm format` and related commands.
    Afterward, I rechecked to ensure all files conformed to the formatting
    standards.
    
    ```bash
    ubuntu@ip-172-31-38-116:~/gravitino/web/web$ pnpm prettier:check
    
    > gravitino-web@ prettier:check /home/ubuntu/gravitino/web/web
    > prettier --check .
    
    Checking formatting...
    All matched files use Prettier code style!
    ```
    Finally, I executed `./gradlew spotlessCheck` to verify no style issues
    remained, and confirmed that `./gradlew clean build` completed
    successfully.
---
 web/web/.prettierrc.js | 1 -
 1 file changed, 1 deletion(-)

diff --git a/web/web/.prettierrc.js b/web/web/.prettierrc.js
index 4d786d3d5c..0405f45f43 100644
--- a/web/web/.prettierrc.js
+++ b/web/web/.prettierrc.js
@@ -25,7 +25,6 @@ module.exports = {
   singleQuote: true,
   quoteProps: 'as-needed',
   jsxSingleQuote: true,
-  trailingComma: 'es5',
   bracketSpacing: true,
   arrowParens: 'avoid',
   endOfLine: 'lf',

Reply via email to