Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

fix: remove allowSyntheticDefaultImports and allow it on docs #46

Merged
merged 7 commits into from
Aug 3, 2018

Conversation

aniknafs
Copy link
Member

@aniknafs aniknafs commented Aug 3, 2018

allowSyntheticDefaultImports is not allowed on neither of teams-modular-packages/WebClient. This PR will disable it for /src but will allow it on the docs site.

As a result, all import statements from packages with no default import is updated:
e.g. import React from 'react' --> import * as React from 'react'

There are a few instances where a 3rd party dependency has an incomplete type def, which are skipped by type assertion:
e.g. const inputClasses = cx(classes.input) --> const inputClasses = (cx as any)(classes.input)

@@ -85,15 +85,15 @@ class Input extends UIComponent<any, any> {
const { children, className, icon, input, type } = this.props
const [htmlInputProps, restProps] = this.partitionProps()

const inputClasses = cx(classes.input)
const inputClasses = (cx as any)(classes.input)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we yarn add --dev @types/classnames to avoid this?

Copy link
Member Author

Choose a reason for hiding this comment

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

we do have it but it still throws

Copy link
Member Author

Choose a reason for hiding this comment

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

reverted the change

Copy link
Contributor

@dvdzkwsk dvdzkwsk left a comment

Choose a reason for hiding this comment

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

Looks good. I think we can get rid of the as any for classnames by adding community typings.

@levithomason
Copy link
Member

Just for posterity's sake, the reason for the change is to support all consumers (not just Teams 😃).

Copy link
Member

@levithomason levithomason left a comment

Choose a reason for hiding this comment

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

Please update the CHANGELOG.md in the root of the project.

@aniknafs
Copy link
Member Author

aniknafs commented Aug 3, 2018

changelog updated

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.

None yet

3 participants