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: object-type-delimeter with new babel-eslint #317

Merged
merged 2 commits into from
Jun 1, 2018

Conversation

mwiencek
Copy link
Contributor

Using babel-eslint 8.2.1, the object-type-delimeter rule does nothing, apparently because the ObjectType{CallProperty,Indexer,Property} nodes no longer contain trailing semicolons/commas, but their parent ObjectTypeAnnotation nodes do.

I could not find a changelog or git commit entry in any of the associated projects for where/why this was changed...

I tried to keep compatibility with both cases, because it's not clear what version this project is targeting. However, I don't know of a good way to test the new behavior given the version of babel-eslint now locked in devDependencies.

Using babel-eslint 8.2.1, the object-type-delimeter rule does nothing,
apparently because the ObjectType{CallProperty,Indexer,Property} nodes
no longer contain trailing semicolons/commas, but their parent
ObjectTypeAnnotation nodes do.

I tried to keep compatibility with both cases, because it's not clear
what version this project is targeting. However, I don't know of a good
way to test the new behavior given the version of babel-eslint now
locked in devDependencies.
@mwiencek
Copy link
Contributor Author

I did test the new code path in my own project by manually updating node_modules/eslint-plugin-flowtype/dist/rules/objectTypeDelimiter.js with these changes, and running eslint; the object-type-delimeter rule then started reporting errors as expected. Since tests pass here, it appears to still work with the older dependency too.

@gajus gajus merged commit e0c328d into gajus:master Jun 1, 2018
@gajus
Copy link
Owner

gajus commented Jun 1, 2018

🎉 This PR is included in version 2.49.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

None yet

2 participants