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

[dashboard] lint warnings: NewProject.tsx #8842

Conversation

trumbitta
Copy link
Contributor

Description

As per https://discord.com/channels/816244985187008514/885406100436951080/953232219261009950

This fixes the first bits of lint warnings.

Specifically:

  • adds ESLint and Prettier to the auto-installed VSCode extensions
  • activates format on save for TypeScript and JavaScript
  • adds a .gp-link Tailwind class to make buttons mimic links and avoid using <a href="javascript:void(0)" ...>
  • fixes all the linting warnings for projects/NewProject.tsx

Related Issue(s)

Re #3841

How to test

  • launch the dashboard app
  • try to create a new project: it should still work
  • look in the console logs or in the terminal: there shouldn't be any lint warning for projects/NewProject.tsx
  • if you are using VSCode, try opening a TypeScript file and check if "format on save" via the Prettier extension is working (remember Prettier won't work if there are syntax errors - red wiggles - in the file)

Release Notes

- [devx]: Added ESLint and Prettier to the auto-installed VSCode extensions
- [devx]: Activated "format on save" for TypeScript and JavaScript
- [dashboard]: Added a `.gp-link` Tailwind class to make buttons mimic anchor tags
- [dashboard]: Fixed all the linting warnings for `projects/NewProject.tsx`

Documentation

To be used for anchor tags that should've been buttons because
they don't really bring the user to any new location.
@geropl
Copy link
Member

geropl commented Mar 16, 2022

LGTM on first glance, though I'd love more feedback from someone who has worked on this code last.
@jankeromnes maybe?

@trumbitta
Copy link
Contributor Author

trumbitta commented Mar 22, 2022

👀🤞 @jankeromnes

@trumbitta
Copy link
Contributor Author

trumbitta commented Mar 28, 2022

Weekly ping to @jankeromnes 🤣

@jankeromnes
Copy link
Contributor

jankeromnes commented Mar 28, 2022

Oh no 🙈 I thought I was better than that at noticing the pings. Having a look 👀

EDIT: Putting this on my "to review" list for tomorrow morning 📝

@jankeromnes
Copy link
Contributor

jankeromnes commented Mar 29, 2022

Okay, let's have a look 👀 thanks for your patience!

/werft run

👎 cannot start job - please talk to whoever's in charge of your Werft installation

@trumbitta
Copy link
Contributor Author

trumbitta commented Mar 29, 2022

👎 cannot start job - please talk to whoever's in charge of your Werft installation

Oh no, werft's a it again!

Invalid value: "gitpod-build-trumbitta-dashboard-lint-warnings-3841-new-pr-fork.0": must be no more than 63 characters

I try to keep branch names short, but all the stuff gitpod and werft (?) add makes it difficult... could this 63 characters cap be raised a bit?

Brb renaming the branch.

@jankeromnes
Copy link
Contributor

jankeromnes commented Mar 29, 2022

Indeed, sorry about that @trumbitta -- FYI, I've bypassed the branch name problem by pushing your commit directly to a shorter Gitpod branch. 😇 As you can see, Werft is now running.

@trumbitta trumbitta closed this Mar 29, 2022
@trumbitta trumbitta deleted the trumbitta/dashboard-lint-warnings-3841-new-project branch March 29, 2022 09:29
@trumbitta
Copy link
Contributor Author

trumbitta commented Mar 29, 2022

Indeed, sorry about that @trumbitta -- FYI, I've bypassed the branch name problem by pushing your commit directly to a shorter Gitpod branch. 😇 As you can see, Werft is now running.

I also renamed the original branch and was going to open a new PR (I had hoped GitHub would cascade the name change but it didn't).

Let me know if you need me to do something about it!

@trumbitta
Copy link
Contributor Author

trumbitta commented Mar 29, 2022

@jankeromnes I see that me renaming the branch also had GitHub closing the PR. What do you want me to do?
Should I go on and reopen the PR with my new branch?
I can't find yours 🕵️‍♂️

@jankeromnes
Copy link
Contributor

jankeromnes commented Mar 29, 2022

I also renamed the original branch and was going to open a new PR (I had hoped GitHub would cascade the name change but it didn't).

Yes, GitHub doesn't support renaming PR branches for some reason. 😅

Should I go on and reopen the PR with my new branch?
I can't find yours 🕵️‍♂️

Yes please! 🙏 (I didn't open a PR, but simply pushed your commit to this branch, which had the effect of making Werft build the commit without issues and even report the status here in this PR, since the commits were identical)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants