Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prettier in package.json calling forge fmt #516

Closed
0x4007 opened this issue Jan 27, 2023 · 21 comments · Fixed by #685
Closed

prettier in package.json calling forge fmt #516

0x4007 opened this issue Jan 27, 2023 · 21 comments · Fixed by #685
Assignees
Labels
DevOps Related to CI, CD, or build related scripts. Permitted

Comments

@0x4007
Copy link
Member

0x4007 commented Jan 27, 2023

I just realized that this could be causing the discrepancy with the formatting. Because this task is named "prettier" it is possible that lint-staged is calling this instead of what we expect.

Originally posted by @pavlovcik in #417 (comment)


 "devDependencies": {
    "cspell": "latest",
    "prettier": "latest",
    "prettier-plugin-solidity": "latest"
  }

if we agree to keep prettier over forge fmt we need to :
1 - add the dev dependencies as stated above
2 - update the overrides section of the .prettierrc in the root folder

Originally posted by @zgorizzo69 in #417 (comment)

@0x4007 0x4007 assigned 0x4007 and unassigned 0x4007 Jan 27, 2023
@0x4007 0x4007 added DevOps Related to CI, CD, or build related scripts. Profit: <10% labels Jan 27, 2023
@0x4007 0x4007 self-assigned this Jan 27, 2023
@0x4007
Copy link
Member Author

0x4007 commented Jan 27, 2023

@zgorizzo69 can you clarify what exactly you think I should do for

update the overrides section of the .prettierrc in the root folder

I basically already handled this in my mega PR. Here's the commit with the latest change https://github.com/ubiquity/ubiquity-dollar/blob/91db6ed9376c7fe1480a9b063e44c94d61a583ac/packages/contracts/package.json

@FibrinLab
Copy link
Contributor

FibrinLab commented Feb 1, 2023

Screenshot 2023-02-01 at 06 18 36

I think this is causing the formatting errors for the solidity files.

@pavlovcik

@FibrinLab
Copy link
Contributor

@pavlovcik Currently working on issue

Screenshot 2023-02-01 at 06 18 36

I think this is causing the formatting errors for the solidity files.
@pavlovcik

Maybe try just using tab_width = 4 with the formatter. I believe it defaults to 2

@0x4007
Copy link
Member Author

0x4007 commented Feb 1, 2023

@pavlovcik Currently working on issue

This is assigned to me so don't worry about it.

@FibrinLab we will not use forge fmt. We will only use prettier so I'm planning to just delete that config.

@ghost
Copy link

ghost commented Jun 13, 2023

/start

@ubiquibot ubiquibot bot assigned ghost Jun 13, 2023
@ubiquibot
Copy link

ubiquibot bot commented Jun 13, 2023

Skipping /start since the issue is closed

@ghost ghost mentioned this issue Jun 13, 2023
@molecula451
Copy link
Contributor

molecula451 commented Jun 18, 2023

/start

@ubiquibot
Copy link

ubiquibot bot commented Jun 18, 2023

Skipping /start since the issue is closed

@molecula451
Copy link
Contributor

mind unassing if not working on the issue?

@0x4007
Copy link
Member Author

0x4007 commented Jun 18, 2023

mind unassing if not working on the issue?

If you can follow up in a couple of days and there are no updates then we can assign you!

@molecula451
Copy link
Contributor

mind unassing if not working on the issue?

If you can follow up in a couple of days and there are no updates then we can assign you!

I just follow up, it looks like assignee it's not working on it after all

#685

@ghost
Copy link

ghost commented Jun 18, 2023

imma make a PR soon

@ghost
Copy link

ghost commented Jun 18, 2023

I just realized that this could be causing the discrepancy with the formatting. Because this task is named "prettier" it is possible that lint-staged is calling this instead of what we expect.

Originally posted by @pavlovcik in #417 (comment)

 "devDependencies": {
    "cspell": "latest",
    "prettier": "latest",
    "prettier-plugin-solidity": "latest"
  }

if we agree to keep prettier over forge fmt we need to : 1 - add the dev dependencies as stated above 2 - update the overrides section of the .prettierrc in the root folder

Originally posted by @zgorizzo69 in #417 (comment)

hey,
can u tell which thing in override i gotta change
on reading the above talk i see we gotta put tab width 4 which it is already

    {
      "files": "*.sol",
      "options": {
        "printWidth": 80,
        "tabWidth": 4,
        "useTabs": false,
        "singleQuote": false,
        "bracketSpacing": false
      }
    }
  ]

@ghost
Copy link

ghost commented Jun 18, 2023

@pavlovcik im gonna push the changes to #681

@rndquu
Copy link
Member

rndquu commented Jun 19, 2023

@pavlovcik im gonna push the changes to #681

Pls create a separate PR, no need to clutter #681

@ghost
Copy link

ghost commented Jun 19, 2023

@pavlovcik im gonna push the changes to #681

Pls create a separate PR, no need to clutter #681

oh sure i reverted the PR gonna make a separate

@ghost
Copy link

ghost commented Jun 19, 2023

/unassign

@ubiquibot ubiquibot bot unassigned ghost Jun 19, 2023
@ubiquibot
Copy link

ubiquibot bot commented Jun 19, 2023

You have been unassigned from the bounty @AnakinSkywalkeer

@ubiquibot
Copy link

ubiquibot bot commented Jun 19, 2023

@molecula451 The time limit for this bounty is on Tue, 20 Jun 2023 15:58:51 GMT

@molecula451
Copy link
Contributor

@molecula451 The time limit for this bounty is on Tue, 20 Jun 2023 15:58:51 GMT

#685

@ubiquibot
Copy link

ubiquibot bot commented Jun 22, 2023

[ CLAIM 200 WXDAI ]

0x4D0704f4...D826dCFc4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DevOps Related to CI, CD, or build related scripts. Permitted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants