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

Migrate from standard to neostandard + Prettier/dprint #166

Open
bajtos opened this issue Sep 10, 2024 · 6 comments
Open

Migrate from standard to neostandard + Prettier/dprint #166

bajtos opened this issue Sep 10, 2024 · 6 comments

Comments

@bajtos
Copy link
Contributor

bajtos commented Sep 10, 2024

I used to be a long-time Eslint+Prettier user. I was honestly trying to learn to like Standard that we are using in our repos, but I am frustrated about many papercuts:

I propose we make the following changes:

@bajtos bajtos changed the title Migrate from standard to neostandard + Prettier Migrate from standard to neostandard + Prettier/dprint Sep 10, 2024
@juliangruber
Copy link
Member

It's easy to discuss these matters for hours, so I'm keeping my answer short:

I used to be a long-time Eslint+Prettier user. I was honestly trying to learn to like Standard that we are using in our repos, but I am frustrated about many papercuts:

When it comes to form, I dislike them. When it comes to function, they are keeping git diffs clean, so I'm in favor.

  • Standard allows multiple ways how to format the same code snippet. I cannot rely on "format-on-save", often I have to clean up the formatting manually.

I see no problems with multiple ways of formatting something as long as all are acceptable. I'm not opposed to switching to a tool that allows only one way, if it always works well.

This is possibly the most important point, as JS / TS is still developing frequently.

  • Standard does not support linting .d.ts files

+1

I propose we make the following changes:

Neostandard and its differences from standard lgtm!

Regarding the formatters, do you see fundamental differences, or shall we create one PR each, to compare the output? We could even base these PRs on top of each other, to see the exact difference between the tools.

@voxpelli
Copy link

This sparked an inspiration for me: neostandard/neostandard#170 Would that be of interest to you?

@bajtos
Copy link
Contributor Author

bajtos commented Sep 13, 2024

This sparked an inspiration for me: neostandard/neostandard#170 Would that be of interest to you?

Yes! Let's continue the discussion in that other issue.

@voxpelli I appreciate that you took the time to post comments in our repo. I know from my own experience how demanding it is to maintain a popular open-source project. Thank you! 🙏🏻

@bajtos
Copy link
Contributor Author

bajtos commented Sep 13, 2024

@bajtos
Copy link
Contributor Author

bajtos commented Sep 18, 2024

Related:

filecoin-station/spark-api#385 (comment)

I think we had a convention that style changes need to be enforced by a linter, so they don't need to get discussed.

(...)
Empty lines used as visual delimiters help me navigate the code faster, so they are important to me.
(...)
My takeaway is that I should investigate how to incorporate a variant of this eslint rule to our linter checks.

@juliangruber
Copy link
Member

I personally dislike empty lines more often than not, especially if they're happening after 2 or 3 lines. It's like putting every sentence of a paragraph in its own paragraph. Let's find rules that make sense and can be applied consistently.

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

No branches or pull requests

3 participants