Skip to content

Commit 0abe414

Browse files
committed
Fix violations
1 parent c497b5a commit 0abe414

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

packages/react-dom/src/client/ReactDOMInput.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,10 @@ export function updateWrapper(element: Element, props: Object) {
178178
// eslint-disable-next-line
179179
node.value != (value: any)
180180
) {
181-
node.value = toString(value);
181+
node.value = toString((value: any));
182182
}
183-
} else if (node.value !== toString(value)) {
184-
node.value = toString(value);
183+
} else if (node.value !== toString((value: any))) {
184+
node.value = toString((value: any));
185185
}
186186
} else if (type === 'submit' || type === 'reset') {
187187
// Submit/reset inputs need the attribute removed completely to avoid

packages/react-dom/src/events/ReactBrowserEventEmitter.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ import isEventSupported from './isEventSupported';
8686
*/
8787

8888
const PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
89+
// prettier-ignore
8990
const elementListenerMap:
91+
// $FlowFixMe Work around Flow bug
9092
| WeakMap
9193
| Map<
9294
Document | Element | Node,

packages/react-dom/src/server/ReactPartialRenderer.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1578,7 +1578,10 @@ class ReactDOMServerRenderer {
15781578
const innerMarkup = getNonChildrenInnerMarkup(props);
15791579
if (innerMarkup != null) {
15801580
children = [];
1581-
if (newlineEatingTags[tag] && innerMarkup.charAt(0) === '\n') {
1581+
if (
1582+
newlineEatingTags.hasOwnProperty(tag) &&
1583+
innerMarkup.charAt(0) === '\n'
1584+
) {
15821585
// text/html ignores the first character in these tags if it's a newline
15831586
// Prefer to break application/xml over text/html (for now) by adding
15841587
// a newline specifically to get eaten by the parser. (Alternately for

packages/react-native-renderer/src/ReactNativeTypes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ type SecretInternalsFabricType = {
137137
* Provide minimal Flow typing for the high-level RN API and call it a day.
138138
*/
139139
export type ReactNativeType = {
140-
NativeComponent: typeof ReactNativeComponent,
140+
NativeComponent: _InternalReactNativeComponentClass<{...}>,
141141
findHostInstance_DEPRECATED(
142142
componentOrHandle: any,
143143
): ?ElementRef<HostComponent<mixed>>,
@@ -156,7 +156,7 @@ export type ReactNativeType = {
156156
};
157157

158158
export type ReactFabricType = {
159-
NativeComponent: typeof ReactNativeComponent,
159+
NativeComponent: _InternalReactNativeComponentClass<{...}>,
160160
findHostInstance_DEPRECATED(componentOrHandle: any): ?HostComponent<mixed>,
161161
findNodeHandle(componentOrHandle: any): ?number,
162162
dispatchCommand(handle: any, command: string, args: Array<any>): void,

packages/react-refresh/src/ReactFreshRuntime.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ export function injectIntoGlobalHook(globalObject: any): void {
488488
hook.onScheduleFiberRoot = function(
489489
id: number,
490490
root: FiberRoot,
491-
children: mixed,
491+
children: ReactNodeList,
492492
) {
493493
if (!isPerformingRefresh) {
494494
// If it was intentionally scheduled, don't attempt to restore.

0 commit comments

Comments
 (0)