-
-
Notifications
You must be signed in to change notification settings - Fork 949
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
chore: turn on padding-line-between-statements #1691
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## next #1691 +/- ##
==========================================
- Coverage 99.64% 99.64% -0.01%
==========================================
Files 2240 2240
Lines 240101 240190 +89
Branches 1068 1068
==========================================
+ Hits 239242 239330 +88
- Misses 838 839 +1
Partials 21 21
|
From looking at the code/changes I wouldnt know how to write it according to the requested style unless I run the fix command. |
Will |
No, sadly not, but |
Suggest to wait until #1636 is done? Then that could be part of the preflight checks. At the moment there are too many different commands to remember to run before committing. |
@Shinigami92 The "What about formatting?" linked page, from @ST-DDT 's screenshot in the linked issue, 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? |
|
I will remove the
Also not that I run manually the |
Seems pretty harmless in practice. I tend to blindly accept any autocorrections suggested by prettier and eslint in VS Code so this wouldn't affect my workflow. |
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.
I have no problem with this kind of rule. It actually make the code more easy to read as a reviewer (at least for me) as I can consume the lines in chunks instead of the entire block at once.
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.
I like this too, makes code much easier to read
related to #1686
For now I only turned on
{ blankLine: 'always', prev: 'block-like', next: '*' }
This will add blank lines after blocks like
if
,for
andswitch
Then I executed
pnpm eslint . --fix
I also sorted the
@typesscript-eslint/*
rules alphabetically@faker-js/maintainers @faker-js/members Please let me know if you like this PR and if I should proceed or if we should merge this now and configure every further more strictness in separate PRs so the PR diff doesn't explode
I would like to additionally configure:
case
in switch blocksblock-like
if somehow possible