Skip to content

Fix eslint warnings - Final (react-composites)#1600

Merged
JamesBurnside merged 3 commits intomainfrom
jaburnsi/eslint-3
Mar 7, 2022
Merged

Fix eslint warnings - Final (react-composites)#1600
JamesBurnside merged 3 commits intomainfrom
jaburnsi/eslint-3

Conversation

@JamesBurnside
Copy link
Copy Markdown
Member

What

Fix eslint warnings and fail builds on eslint warnings

NOTE: please review the changes to the react hook dependency arrays closely, these can easily cause regressions.

Why

Continuation of #1597 and #1598

How Tested

I haven't but if please inspect the useEffect dependency changes closely

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 4, 2022

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 7, 2022

props.styles ?? {}
),
[theme]
[props.styles, theme.palette.neutralLight]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: I tend to think of theme as an atomic unit. I'd not expect Contoso to modify parts of the theme so it's OK to add theme as the dependency (especially if the list of theme fields we reference starts growing)

}
},
[props.speakers, props.onSelectSpeaker]
[speakers, onSelectSpeaker]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why did you need to do this?

* @TODO Remove this function and pass the props directly when file-sharing is promoted to stable.
* @private
*/
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can use FileSharingOptions return type. The type is defined unconditionally (the field ChatCompositeOptions.fileSharing is conditionally defined.

@JamesBurnside JamesBurnside merged commit 8dac971 into main Mar 7, 2022
@JamesBurnside JamesBurnside deleted the jaburnsi/eslint-3 branch March 7, 2022 18:33
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.

3 participants