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

Merged

Conversation

yasarsid
Copy link
Contributor

Fixes #2293

Overview

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

@typescript-eslint
Copy link
Contributor

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 https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@codecov
Copy link

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%> (ø)
...es/eslint-plugin/src/rules/no-loss-of-precision.ts 91.66% <0.00%> (ø)
... and 20 more

Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@bradzacher bradzacher added awaiting response Issues waiting for a reply from the OP or another party enhancement: new base rule extension New base rule extension required to handle a TS specific case labels May 24, 2021
@bradzacher bradzacher removed the awaiting response Issues waiting for a reply from the OP or another party label Jun 4, 2021
@yasarsid yasarsid requested a review from bradzacher June 23, 2021 03:44
Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@bradzacher bradzacher added the awaiting response Issues waiting for a reply from the OP or another party label Jul 31, 2021
@bradzacher bradzacher removed the awaiting response Issues waiting for a reply from the OP or another party label Aug 9, 2021
Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@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.
Labels
enhancement: new base rule extension New base rule extension required to handle a TS specific case
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rule proposal: make padding-line-between-statements support TS syntax
2 participants