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

fix(parser): allow to visit typeParameters in OptionalCallExpression #1377

Merged
merged 1 commit into from Dec 24, 2019
Merged

fix(parser): allow to visit typeParameters in OptionalCallExpression #1377

merged 1 commit into from Dec 24, 2019

Conversation

armano2
Copy link
Member

@armano2 armano2 commented Dec 24, 2019

allow to visit typeParameters in OptionalCallExpression

  • add missing test case for type parameters in optional call expression

- add missing test case for type parameters in optional call expression
@typescript-eslint
Copy link
Contributor

Thanks for the PR, @armano2!

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.

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.

LGTM - thanks!

@bradzacher bradzacher added the bug Something isn't working label Dec 24, 2019
@bradzacher bradzacher merged commit cba6a2a into typescript-eslint:master Dec 24, 2019
@armano2 armano2 deleted the fix-type-parameters-optionals branch December 24, 2019 05:43
@@ -366,7 +366,7 @@ function parseAndGenerateServices<T extends TSESTreeOptions = TSESTreeOptions>(
)!;

/**
* Determine whether or not two-way maps of converted AST nodes should be preserved
* Determine whatever or not two-way maps of converted AST nodes should be preserved
Copy link

Choose a reason for hiding this comment

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

wasn't this correct?
Sounds strange now 🤔

Copy link
Member Author

@armano2 armano2 Dec 30, 2019

Choose a reason for hiding this comment

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

@BO41 hmm, you might be right, "whatever or not" seems weird

The addition of the "or not" is neither logically nor grammatically required. I think it's often used conversationally for emphasis. I definitely wouldn't use it in writing myself.
https://english.stackexchange.com/questions/3382/whether-or-not-vs-whether


—used as a function word usually with correlative or or with or whether to indicate (1) until the early 19th century a direct question involving alternatives; (2) an indirect question involving stated or implied alternatives
https://www.merriam-webster.com/dictionary/whether


Q: When you use “whether,” do you need “or not”? I find “whether” being used alone for “if,” and I wonder what is correct.

A: In the phrase “whether or not,” the “or not” is often optional. When the choice is up to you, you can generally use either “whether” or “if.”


i think it will be safer to change it to

Suggested change
* Determine whatever or not two-way maps of converted AST nodes should be preserved
* Determine if two-way maps of converted AST nodes should be preserved

what do you think? i'm not that good at grammar

Copy link

Choose a reason for hiding this comment

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

just the "if" sounds good 👍
Or just "whether" (not "whatever" ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants