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

prefer-default-export false negative with named exports #609

Closed
danielkcz opened this issue Oct 5, 2016 · 5 comments
Closed

prefer-default-export false negative with named exports #609

danielkcz opened this issue Oct 5, 2016 · 5 comments
Labels

Comments

@danielkcz
Copy link

danielkcz commented Oct 5, 2016

I have a simple file Memory.js which contains:

import t from 'tcomb'
import MemoryKey from './MemoryKey'

const Memory = t.declare('Memory')

export const MemoryValue = t.union([ Memory, t.String, t.Boolean, t.Number,], 'MemoryValue')
export default Memory.define(t.dict(MemoryKey, MemoryValue))

Then in index.js which exports all the types, I have it like this...

export Memory, { MemoryValue } from './Memory' // eslint-disable-line import/prefer-default-export
export MemoryDictionary from './MemoryDictionary'
export MemoryKey from './MemoryKey'

The rule prefer-default-export is failing on that line for some reason. Babel transpiles that code just fine.

eslint: 3.7.0
eslint-plugin-import: 1.16.0
eslint-config-airbnb-base: 8.0.0

@benmosher
Copy link
Member

Are you using babel-eslint?

@danielkcz
Copy link
Author

Yes, of course. Not sure why I omitted that one from the list :)

babel-eslint: 7.0.0

@benmosher
Copy link
Member

Sounds like a bug, then. Will take a look 😄

@jfmengels
Copy link
Collaborator

Fixed in #622 :)

@danielkcz
Copy link
Author

Awesome, thanks ! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants