-
-
Notifications
You must be signed in to change notification settings - Fork 87
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 integration POC #360
Conversation
Thank you for this POC.
Let's keep it on evolution level, not revolution ;] Ok couple of things that I have questions about
2.) We will loose 2 lines after import statements; but I can live with that (prettier/prettier#1610) 3.) This is something that really sucks 4.) Spaces in functions declarations: prettier/prettier#3847; Is there some options for this ? |
This is part of what prettier does. With semis disabled it will still insert semis for cases where their absence would cause problems.
I'll take a look tomorrow
Np
Prettier will win, so its a matter of changing eslint rules to be harmonious with how prettier formats and disabling all eslint autofixing. When we are happy with how prettier is formatting I can look at this.
Yep. This is not optional
Not sure exactly what you mean - the wrapping?
Looks like this is going to land shortly: prettier/prettier#3903 |
Ok understand, let's keep the semicolons in for now.
Wrapping of chained method calls. Seems really unreadable for me. Let's see how will it look at 80 chars. |
# Conflicts: # src/index.d.ts # test/mapIndexed.js
Got everything playing nicely locally so please take a look when you get the chance. Prettier now runs prior to eslint and tslint on Looks like code climate has two issues for If everything else is OK I'll create a separate PR for |
@char0n Shall I get this done before this PR gets too out of sync with master? |
I'll look at this during tomorrow. Meanwhile I will not merge any code related or configuration PRs. Sorry for delay |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Great job! Some constructrs look a little bit strange that is price for consistency I guess.
.eslintrc
Outdated
], | ||
"plugins": ["eslint-plugin-ramda"], | ||
"plugins": ["eslint-plugin-ramda", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
properly format the array comprehension pls
@@ -57,8 +57,7 @@ | |||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please drop the package-lock.json
test/isNotFloat.js
Outdated
eq(RA.isNotFloat(0), true); | ||
eq(RA.isNotFloat(1), true); | ||
eq(RA.isNotFloat(-100000), true); | ||
eq(RA.isNotFloat(MAX_SAFE_INTEGER), true); | ||
eq(RA.isNotFloat(MIN_SAFE_INTEGER), true); | ||
eq(RA.isNotFloat(5e+0), true); | ||
eq(RA.isNotFloat(5), true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the scientific notation has been dropped here, but was here by design, can we ignore here ?
test/isNotFloat.js
Outdated
|
||
eq(RA.isNotFloat(0.1), false); | ||
eq(RA.isNotFloat(Math.PI), false); | ||
eq(RA.isNotFloat(5.56789e+0), false); | ||
eq(RA.isNotFloat(5.56789), false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the scientific notation has been dropped here, but was here by design, can we ignore here ?
We can fix code climate issues after the merge. There are some conflicts to resolve in this PR. Can you check it out before we merge (by rebasing on top of currenct master) ? I'd like to rebase this instead of merging. |
Rerurning the ci build and if green, then merging. I can see now that there are 4 pending comments that has not been addressed. Can you look at it pls ? |
@char0n Those should now be addressed. |
This PR adds prettier and integrates it with eslint. It's for discussion so please take a look.
I have run it on all files in the
src/
andtest/
dirs.Prettier's minimal options are here. I would recommend:
I have it configured (with VSCode) so it formats on save which I find to be very very useful. It really becomes part of your workflow - you don't need to think about formatting at all.
I've added it to the
lint
script. It could go into thelint:fix
script instead, but I think it should happen transparently when linting.It'll take some tweaking to get eslint happy with what prettier does, but I'll hold off doing that for the moment until we decide it's something we want.
closes #336