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

Simplify object and class methods #457

Closed
wants to merge 2 commits into from
Closed

Simplify object and class methods #457

wants to merge 2 commits into from

Conversation

AshleyScirra
Copy link

Simplify object and class methods consistently with object properties.
Transforms { ["foo"]() {} } to { foo() {} } and class C { ["foo"]() {} } to class C { foo() {} }. Includes tests.

Simplify object and class methods consistently with object properties.
Transforms `{ ["foo"]() {} }` to `{ foo() {} }` and `class C { ["foo"]()
{} }` to `class C { foo() {} }`. Includes tests.
Had a wrong test expectation.
@AshleyScirra
Copy link
Author

Think it only failed due to linting.

@AshleyScirra
Copy link
Author

npm run fix didn't fix anything, does it need manually fixing?

exit({ node }) {
const key = node.key;

if (t.isStringLiteral(key) && t.isValidIdentifier(key.value)) {
Copy link
Member

Choose a reason for hiding this comment

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

related discussion #416 .

@boopathi
Copy link
Member

boopathi commented May 2, 2018

Closing this as stale. Please comment to reopen

@boopathi boopathi closed this May 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants