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: Include string literal object keys as used #5

Merged
merged 10 commits into from
Mar 25, 2020

Conversation

eps1lon
Copy link
Contributor

@eps1lon eps1lon commented Mar 23, 2020

String literals as object keys are currently ignored. These are used to destructure e.g. aria-* props or data-* props:

export default function Dialog(props) {
	const { 'aria-describedby': ariaDescribedby } = props;
	return null;
}

src/generator.ts Outdated Show resolved Hide resolved
jest.config.js Outdated Show resolved Hide resolved
Copy link
Owner

@merceyz merceyz left a comment

Choose a reason for hiding this comment

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

Interesting that material-ui didn't come across this before, thanks for fixing it!

I finally got around to finish the testing architecture I started on some time ago, could you update the test to use it please

Copy link
Owner

@merceyz merceyz left a comment

Choose a reason for hiding this comment

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

Updated the test to use the fixtures instead, otherwise looks good. Thanks

@merceyz merceyz merged commit 3fd7b70 into merceyz:master Mar 25, 2020
@eps1lon eps1lon deleted the fix/aria-props branch March 25, 2020 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants