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

refactor: first draft of converting to hooks #122

Closed
wants to merge 9 commits into from
Closed

refactor: first draft of converting to hooks #122

wants to merge 9 commits into from

Conversation

Enubia
Copy link
Contributor

@Enubia Enubia commented Mar 14, 2021

this pr is a first draft of converting everything to hooks

so far everything works as intended, the only file i didn't touch right now is the helpers.js since i honestly have no clue what's going on in the withHelpers function

@bsides maybe you can give me some insights there

additionally i've added eslint and prettier configurations, let me know if i should remove them, just thought it might be a good idea since the project wasn't really formatted tbh

i also updated all dependencies since most of them weren't up to date

@bsides
Copy link
Owner

bsides commented Mar 14, 2021

Just by the description I'm already loving it. Will review your PR later today. Thank you so much for you efforts!

@Enubia
Copy link
Contributor Author

Enubia commented Mar 14, 2021

maybe you could check out my other PRs before that since those contain fixes and features which I'd need to merge in this branch as well

Copy link
Owner

@bsides bsides left a comment

Choose a reason for hiding this comment

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

Noting to myself to review this weekend

@@ -0,0 +1,6 @@
{
"printWidth": 100,
Copy link
Owner

Choose a reason for hiding this comment

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

Since we're out there, I'd prefer 120. I know why 80 is the standard since simpler times (and squared resolutions) but since we're programming in very wide resolutions, I'm more inclined to more space. Would you agree?

"singleQuote": true,
"trailingComma": "all",
"endOfLine": "lf"
}
Copy link
Owner

Choose a reason for hiding this comment

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

I'd also add "semi": false here, but I'm fine with either

@@ -0,0 +1,119 @@
module.exports = {
Copy link
Owner

Choose a reason for hiding this comment

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

There are many rules here that are from coding style, like identation. I think we should leave this kind of thing to prettier and complete ignore from the linter, like Create React App (CRA) does.

Copy link
Owner

Choose a reason for hiding this comment

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

Just to fortify this comment, tools like Prettier plugin and/or Husky + Lint Staged can format the code automatically - so we should never really tell the user if the style is wrong. I don't think that red lines indicating bad identation is good because it's not an error, and shouldn't warn me either. It's just a style, let the IDE do its job (or automation).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well the IDE, doesn't matter if VSCode or WebStorm, doesn't format anything without a config. Yes there's a default prettier setting in VSCode but for example I don't have that enabled and it differs between developers what they have setup. Sure it is a lot of configuration stuff but CRA doesn't format without config and neither does husky/lint-staged.

I can remove it as I said ealier, just thought that some sort of styling guidline should be done.

@bsides
Copy link
Owner

bsides commented Mar 18, 2021

maybe you could check out my other PRs before that since those contain fixes and features which I'd need to merge in this branch as well

will do!

@Enubia Enubia closed this Apr 3, 2022
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.

2 participants