Skip to content

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

Closed
@danielkcz

Description

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

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions