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

Try turn on eslint @typescript-eslint/padding-line-between-statements #1686

Closed
1 of 3 tasks
Shinigami92 opened this issue Dec 25, 2022 · 11 comments
Closed
1 of 3 tasks
Assignees
Labels
c: chore PR that doesn't affect the runtime behavior
Milestone

Comments

@Shinigami92
Copy link
Member

Shinigami92 commented Dec 25, 2022

To ensure consistent readability across multiple contributors and prevent writing reviews like "pls add a blank line here" we want to try to turn on and configure https://typescript-eslint.io/rules/padding-line-between-statements/

TODO

@Shinigami92 Shinigami92 added the c: chore PR that doesn't affect the runtime behavior label Dec 25, 2022
@Shinigami92 Shinigami92 moved this to Todo in Faker Roadmap Dec 25, 2022
@ST-DDT
Copy link
Member

ST-DDT commented Dec 25, 2022

I'm not against adding the rule, but from their page:

20221225_170510

@Shinigami92
Copy link
Member Author

@ST-DDT please note that this message appears for everyone visiting the page and I know why they are saying this
But please provide an alternative proposal for a solution for the issue described in the description of this issue or provide other reasons why you think it is important to explicitly double express this warning message from their site

I know that prettier doesn't have any kind of option to fulfill our needs but also know that I'm tired of writing review comments for this over and over again

@ST-DDT
Copy link
Member

ST-DDT commented Dec 25, 2022

As I said, I'm not against this rule.

I just dont know what this rule does exactly.

  • The linked page does not contain an example
  • I dont know how/whether this will impact our code
  • I dont remember any instance where that was an issue.

I personally prefer PRs for "do something tiny" over issue + PRs.

Also in context of #1683

@Shinigami92
Copy link
Member Author

The linked page does not contain an example

@typescript-eslint reflects many native rules and therefore for examples you need to look into the native one: https://eslint.org/docs/latest/rules/padding-line-between-statements

But this is basically the first paragraph in the examples

I personally prefer PRs for "do something tiny" over issue + PRs.

I'm okay with that you personally prefer this and cant do anything against your preference,
but I would like to drive Faker as an Open Source project where anyone is welcome to contribute
It is hard to contribute to a project when you don't know what is currently available to contribute
Issues make this more open to the community

In addition to that, I don't have always the time to instantly tackle something and therefore instead of making my own note block full with anykind of potential things I can do, I like to help myself with issues so I can better remember what I wanted to do all kind of things

@EarthyOrange
Copy link

@Shinigami92 The "What about formatting?" linked page from @ST-DDT 's screenshot recommends configuring adding blank lines using a formatter instead of a linter. I see that this project uses the Prettier formatter; can you attempt following the recommendation and use the formatter to drive this formatting?

@Shinigami92
Copy link
Member Author

Shinigami92 commented Dec 26, 2022

@EarthyOrange I'm sorry but prettier does not have such an option
If I'm wrong please tell me how you can configure prettier to do that

Edit: you can even read that on prettier website: https://prettier.io/docs/en/rationale.html#empty-lines

@EarthyOrange
Copy link

@Shinigami92 No, you are right; Prettier has stopped dealing with blank lines. You will have to use the linter to add blank lines.

@xDivisionByZerox
Copy link
Member

Is this still active or do we consider this done as #1691 has been merged? I see the other TODO's but would consider them obsolete.

@Shinigami92
Copy link
Member Author

Is this still active or do we consider this done as #1691 has been merged? I see the other TODO's but would consider them obsolete.

Please see #1703 (comment) for more details

@xDivisionByZerox
Copy link
Member

Please see #1703 (comment) for more details

Thats exactly why I consider these remaining doings obsolte. I'm with the comment made in typescript-eslint/typescript-eslint#6291 (comment).

@Shinigami92
Copy link
Member Author

Looks like I'm turning back to writing "pls add a blank line here" in reviews 🤷

@Shinigami92 Shinigami92 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: chore PR that doesn't affect the runtime behavior
Projects
No open projects
Status: In Progress
Development

No branches or pull requests

4 participants