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 space-infix-ops #2593

Merged
merged 1 commit into from Oct 24, 2020

Conversation

doumart
Copy link
Contributor

@doumart doumart commented Sep 22, 2020

Closes #2536

Hello! It's my first time opening a MR. I don't know if i forgot something, don't be shy i can take criticism. the only thing that bothers me it is the

     if (nonSpacedNode) {
        report(node, nonSpacedNode);
      }

It says "Excessive stack depth comparing types 'TSEnumMember' and 'Node'" and i dont really know what it means.

For the most part of the code it is functions for the eslint rule but applied to enum members too.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @doumart!

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.

@bradzacher bradzacher added the enhancement: new base rule extension New base rule extension required to handle a TS specific case label Sep 22, 2020
@bradzacher bradzacher changed the title feat(eslint-plugin): [space-infix-ops] extention rule feat(eslint-plugin): add extension rule space-infix-ops Sep 22, 2020
@doumart
Copy link
Contributor Author

doumart commented Sep 23, 2020

Build fails because of "Excessive stack depth comparing types 'TSEnumMember' and 'Node'". Anybody know how to fix this?

@codecov
Copy link

codecov bot commented Sep 25, 2020

Codecov Report

Merging #2593 into master will decrease coverage by 0.00%.
The diff coverage is 90.00%.

@@            Coverage Diff             @@
##           master    #2593      +/-   ##
==========================================
- Coverage   92.79%   92.78%   -0.01%     
==========================================
  Files         294      295       +1     
  Lines        9682     9712      +30     
  Branches     2717     2725       +8     
==========================================
+ Hits         8984     9011      +27     
- Misses        330      331       +1     
- Partials      368      370       +2     
Flag Coverage Δ
#unittest 92.78% <90.00%> (-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% <ø> (ø)
...ackages/eslint-plugin/src/rules/space-infix-ops.ts 90.00% <90.00%> (ø)

@doumart
Copy link
Contributor Author

doumart commented Sep 25, 2020

Closes #2536

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.

definitely going in the right direction!
Overall the logic LGTM.
A few comments.
Thanks for your work!

packages/eslint-plugin/tests/rules/space-infix-ops.test.ts Outdated Show resolved Hide resolved
packages/eslint-plugin/src/rules/space-infix-ops.ts Outdated Show resolved Hide resolved
packages/eslint-plugin/src/rules/space-infix-ops.ts Outdated Show resolved Hide resolved
packages/eslint-plugin/src/rules/space-infix-ops.ts Outdated Show resolved Hide resolved
packages/eslint-plugin/src/rules/space-infix-ops.ts Outdated Show resolved Hide resolved
packages/eslint-plugin/src/rules/space-infix-ops.ts Outdated Show resolved Hide resolved
packages/eslint-plugin/src/rules/space-infix-ops.ts Outdated Show resolved Hide resolved
packages/eslint-plugin/src/rules/space-infix-ops.ts Outdated Show resolved Hide resolved
@bradzacher bradzacher added the awaiting response Issues waiting for a reply from the OP or another party label Oct 4, 2020
@doumart
Copy link
Contributor Author

doumart commented Oct 8, 2020

did some corrections. I don't know how if i have to resolve conversation myself or if it is the person who started it. And if there is still thing to change don't hesitate. I'll also try to response quicker

@bradzacher bradzacher removed the awaiting response Issues waiting for a reply from the OP or another party label Oct 8, 2020
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.

one final minor comment and then we're good to go!
thanks for all your work here

packages/eslint-plugin/src/rules/space-infix-ops.ts Outdated Show resolved Hide resolved
@bradzacher bradzacher added the awaiting response Issues waiting for a reply from the OP or another party label Oct 18, 2020
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.

great work! Thanks for the contribution!

This was referenced Oct 27, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 24, 2020
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.

[new-rule-request] : Enum operator spacing
5 participants