Navigation Menu

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(typescript-estree): tighten prop name and destructure types #1346

Merged
merged 1 commit into from Dec 18, 2019

Conversation

bradzacher
Copy link
Member

Whilst working on #1318, I noticed that the types for both property names and destructuring were wrong.

property names assumed that only Identifier | Literal were valid, when in fact any expression is valid, if and only if the name is computed: { [1 + 2]: 1 }.

Part of me thinks we should probably split the types to make this nicer (I've raised #1345)

The destructuring types were also inconsistent, so I corrected them.

@bradzacher bradzacher added the enhancement New feature or request label Dec 18, 2019
@typescript-eslint
Copy link
Contributor

Thanks for the PR, @bradzacher!

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 Dec 18, 2019

Codecov Report

Merging #1346 into master will increase coverage by 0.03%.
The diff coverage is 93.75%.

@@            Coverage Diff             @@
##           master    #1346      +/-   ##
==========================================
+ Coverage   93.94%   93.98%   +0.03%     
==========================================
  Files         131      131              
  Lines        5865     5864       -1     
  Branches     1662     1662              
==========================================
+ Hits         5510     5511       +1     
+ Misses        188      187       -1     
+ Partials      167      166       -1
Impacted Files Coverage Δ
packages/eslint-plugin/src/rules/member-naming.ts 100% <ø> (ø) ⬆️
...-plugin/src/rules/explicit-member-accessibility.ts 89.09% <100%> (ø) ⬆️
...ackages/eslint-plugin/src/rules/member-ordering.ts 92.3% <100%> (ø) ⬆️
...t-plugin/src/rules/adjacent-overload-signatures.ts 93.02% <100%> (ø) ⬆️
packages/eslint-plugin/src/util/misc.ts 92.85% <90.9%> (+6.65%) ⬆️

@armano2
Copy link
Member

armano2 commented Dec 18, 2019

small question about new type, key can be whatever but only if its computed

nvm i see you created ticket for this

@bradzacher
Copy link
Member Author

See #1345
I've almost got a PR ready for this.

@bradzacher bradzacher changed the title chore: tighten up property name and destructuring types feat(typescript-estree): tighten up property name and destructuring types Dec 18, 2019
@bradzacher bradzacher changed the title feat(typescript-estree): tighten up property name and destructuring types feat(typescript-estree): tighten prop name and destructure types Dec 18, 2019
@bradzacher bradzacher merged commit f335c50 into master Dec 18, 2019
@bradzacher bradzacher deleted the minor-cleanup branch December 18, 2019 08:43
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants