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

Align PR handling of default values #346

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/components/PlayerView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
config,
fullscreenHandler,
customMessageHandler,
isFullscreenRequested = false,
isFullscreenRequested,
scalingMode,
isPictureInPictureRequested = false,
isPictureInPictureRequested,
...props
}: PlayerViewProps) {
// Workaround React Native UIManager commands not sent until UI refresh
Expand Down Expand Up @@ -125,21 +125,21 @@

useEffect(() => {
const node = findNodeHandle(nativeView.current);
if (node) {
if (node && isFullscreenRequested != undefined) {

Check warning on line 128 in src/components/PlayerView/index.tsx

View workflow job for this annotation

GitHub Actions / Code style Typescript

Expected '!==' and instead saw '!='
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use !== instead as the Check warning indicated!

Suggested change
if (node && isFullscreenRequested != undefined) {
if (node && isFullscreenRequested !== undefined) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting. Which tool is emitting those warning? If we need to avoid them, should it be part of the CI? (I don't have any warning on my side)

Copy link
Contributor

Choose a reason for hiding this comment

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

yarn lint

It already runs on the CI and you can see the warnings only on the Files changed tab.

This should be executed as pre-commit hook if you have husky installed.

Copy link
Contributor Author

@krocard krocard Dec 7, 2023

Choose a reason for hiding this comment

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

Can we make them errors? #348

Copy link
Contributor

Choose a reason for hiding this comment

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

Thx for changing it!

dispatch('setFullscreen', node, isFullscreenRequested);
}
}, [isFullscreenRequested, nativeView]);

useEffect(() => {
const node = findNodeHandle(nativeView.current);
if (node && scalingMode) {
if (node && scalingMode != undefined) {

Check warning on line 135 in src/components/PlayerView/index.tsx

View workflow job for this annotation

GitHub Actions / Code style Typescript

Expected '!==' and instead saw '!='
krocard marked this conversation as resolved.
Show resolved Hide resolved
dispatch('setScalingMode', node, scalingMode);
}
}, [scalingMode, nativeView]);

useEffect(() => {
const node = findNodeHandle(nativeView.current);
if (node) {
if (node && isPictureInPictureRequested != undefined) {

Check warning on line 142 in src/components/PlayerView/index.tsx

View workflow job for this annotation

GitHub Actions / Code style Typescript

Expected '!==' and instead saw '!='
krocard marked this conversation as resolved.
Show resolved Hide resolved
dispatch('setPictureInPicture', node, isPictureInPictureRequested);
}
}, [isPictureInPictureRequested, nativeView]);
Expand Down
Loading