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

feat(eslint-plugin): add extension rule padding-line-between-statements #3418



Copy link

@yasarsid yasarsid commented May 21, 2021

Fixes #2293


Add an extension rule for padding-line-between-statements so that we start supporting basic scenarios for it.

  • UTs and Tests as recommended
  • Thanks to @jun-sheaf for the initial attempt - I have reused some of the test code.

Link to the rule code in ESLint can be found here

Copy link

@typescript-eslint typescript-eslint bot commented May 21, 2021

Thanks for the PR, @yasarsid!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!

🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.


Copy link

@codecov codecov bot commented May 21, 2021

Codecov Report

Merging #3418 (23de1f7) into master (fc5f171) will increase coverage by 0.00%.
The diff coverage is 91.09%.

@@           Coverage Diff            @@
##           master    #3418    +/-   ##
  Coverage   92.66%   92.66%            
  Files         324      328     +4     
  Lines       11188    11497   +309     
  Branches     3157     3252    +95     
+ Hits        10367    10654   +287     
- Misses        365      371     +6     
- Partials      456      472    +16     
Flag Coverage Δ
unittest 92.66% <91.09%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/eslint-plugin/src/configs/all.ts 100.00% <ø> (ø)
...lugin/src/rules/padding-line-between-statements.ts 91.09% <91.09%> (ø)
...ackages/eslint-plugin/src/rules/prefer-includes.ts 97.87% <0.00%> (-1.03%) ⬇️
packages/typescript-estree/src/node-utils.ts 97.83% <0.00%> (ø)
packages/typescript-estree/src/simple-traverse.ts 75.00% <0.00%> (ø)
...ackages/experimental-utils/src/ts-eslint/Linter.ts 100.00% <0.00%> (ø)
...ages/eslint-plugin/src/rules/prefer-regexp-exec.ts 100.00% <0.00%> (ø)
...ges/experimental-utils/src/ast-utils/predicates.ts 36.84% <0.00%> (ø)
...ges/experimental-utils/src/ts-eslint/RuleTester.ts 100.00% <0.00%> (ø) 91.66% <0.00%> (ø)
... and 20 more


Copy link

@bradzacher bradzacher left a comment

I see no tests for any TS code.
So it looks like you haven't actually enhanced anything in the rule.

this PR must make changes to the rule to support TS syntax, or else there's no point in extending it.


@yasarsid yasarsid requested a review from bradzacher Jun 23, 2021
Copy link

@bradzacher bradzacher left a comment

thanks for this - a few comments, but otherwise LGTM.
Thanks for all your work on this!


Copy link

@bradzacher bradzacher left a comment

thanks for this!


@bradzacher bradzacher changed the title feat(eslint-plugin): add padding-line-between-statements feat(eslint-plugin): add extension rule padding-line-between-statements Sep 3, 2021
@bradzacher bradzacher merged commit f79ae9b into typescript-eslint:master Sep 3, 2021
10 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants