Skip to content
This repository was archived by the owner on May 17, 2019. It is now read-only.

Conversation

@koulmomo
Copy link

Rationale, I have a component Button, looks like this:

// ...
export class Button extends Component {
// ...
}

export default styled(Button);

Except for tests, I 100% of the time do import Button from 'path/to/my/button'

With the level for the import/no-named-as-default set to 'error', I have to do something like import StyledButon from 'path/to/my/button'

setting the rule level to "warn" instead of "error" WARNS the user in case they were supposed to import the named export, but if you know that you want the default, you can safely ignore

Rationale, I have a component `Button`, looks like this:

```js
// ...
export class Button extends Component {
// ...
}

export default styled(Button);
```

Except for tests, I 100% of the time do `import Button from 'path/to/my/button'`

With the level for the `import/no-named-as-default` set to `'error'`, I have to do something like `import StyledButon from 'path/to/my/button'`

setting the rule level to "warn" instead of "error" WARNS the user in case they were supposed to import the named export, but if you know that you want the default, you can safely ignore
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant