-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Linting: StandardJS for src/, test/; Prettier for types/ #2544
Linting: StandardJS for src/, test/; Prettier for types/ #2544
Conversation
@josdejong In discussion of #2542 you mentioned
If you ever decide this is worth pursuing, I believe almost all merge conflicts could be resolved nearly automatically through some git surgery which I laid out in #2541 (comment) The 10-step guide is perhaps a bit daunting, but it might be possible to automate those steps. I wrote that mostly as a proof-of-concept. But a big change like that would also clutter visibility of the timeline in git history. I don't think that's avoidable :/ |
dc6c390
to
0aa235c
Compare
As this is still a fairly big watershed, as before I will leave this to you and Jos. I'll just make a couple comments/observations which you can take or leave. |
I will be honest I did not go over all of index.d.ts carefully. My eyes glazed over with all of the semicolon removals. Which does beg the question (which should really be addressed separately from this PR) of whether there's any convenient mechanism for index.d.ts and likely index.ts as well to be split into multiple files, maybe one per Anyhow, my overall takeaway is that this is a reasonable approach. And now as I said I will step out of the way and let you iron it all out. |
@gwhitney Thank you for taking the time to review this. I think I've responded to all the comments/questions, and have made a few updates. In some places (e.g., converting multiline objects to single line) I agree with you but would prefer to leave it out of this PR. Or potentially do it as a last commit in this PR, but I'd rather make as few manual changes as possible in case we end up closing this in favor of a 4th linting PR |
Well, as I've said, this sort of thing is not really my forte, so my comments were meant just as my uninformed impressions/reactions, in case those were helpful to the discussion between you and Jos. So it's extremely kind of you to go through them in such detail. I will therefore limit myself to just two small further responses to this round of discussion:
becomes Looking forward to getting through this :) |
👍
Yeah, you're probably right. And there aren't too many. It's possible I missed a few, but I believe all two-element and three-element objects are now on a single line, if they fit. My 2c would be it's probably not worth trying to enforce this on PRs, though: If linting conventions aren't enforceable by CI, they're probably a lost cause. |
I for one totally agree. I am a believer that it's actually best to allow some latitude in layout to the judgment of the coder, because different circumstances call for different emphasis, etc. I think the recent drive to have one automated way to lay out any given section of code is a bit overkill/misguided. |
Thanks a lot @ChristopherChudzicki , this is looking very good 😎 I've resolved most the conversations, a few are still open, can you have another look at those? |
@josdejong I believe I've addressed all the comments. I did add |
Thanks Christopher. Only two small conversations are still open I think (unless I'm overlooking something) |
@josdejong matrix definition extracted; let me know what you want to do with that comment. IMO, it's not any more or less confusing now than it was before this PR, so I don't think it needs to change, but if someone has a suggested re-wording, including the change here could make sense to keep history simpler. |
@ChristopherChudzicki thanks. Did you maybe forget to push your last commit with the matrix definition extraction? I don't see it applied yet. ok let's leave that comment as it is, I do not really have a suggestion that improves it a lot and it's not worth spending too much time on. |
@josdejong Whoops, yes I did forget to push the commits. Pushed, and slightly tweaked those comments around @gwhitney 's suggestion |
Thanks again Chris for all your work, merging the PR now 👍 |
What are the associated issues?
#2488
See #2542, #2541 for earlier efforts
What does this PR do?
This PR switches to use ESLint directly rather than the StandardJS CLI. Roughly, the config is:
This is the approach (tentatively) decided upon in #2542 (See #2542 (comment) and @josdejong's reply thereto). With this approach:
npm run lint
andnpm run lint -- --fix
.