Skip to content

Commit d56c262

Browse files
committed
Fix lint errors and run through prettier
1 parent 0150161 commit d56c262

File tree

7 files changed

+28
-8
lines changed

7 files changed

+28
-8
lines changed

.eslintrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
"react": {
1212
"version": "detect"
1313
},
14+
"import/ignore": ["react-native"],
1415
"import/resolver": {
1516
"node": {
16-
"extensions": [".js", ".ts"]
17+
"extensions": [".js", ".ts", ".tsx"]
1718
}
1819
}
1920
},

src/components/Context.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@ import { Action, AnyAction, Store } from 'redux'
33
import type { FixTypeLater } from '../types'
44
import type Subscription from '../utils/Subscription'
55

6-
export interface ReactReduxContextValue<SS = FixTypeLater, A extends Action = AnyAction> {
6+
export interface ReactReduxContextValue<
7+
SS = FixTypeLater,
8+
A extends Action = AnyAction
9+
> {
710
store: Store<SS, A>
811
subscription: Subscription
912
}
1013

11-
export const ReactReduxContext = /*#__PURE__*/ React.createContext<ReactReduxContextValue | null>(null)
14+
export const ReactReduxContext = /*#__PURE__*/ React.createContext<ReactReduxContextValue | null>(
15+
null
16+
)
1217

1318
if (process.env.NODE_ENV !== 'production') {
1419
ReactReduxContext.displayName = 'ReactRedux'

src/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export type FixTypeLater = any
1+
export type FixTypeLater = any

src/utils/batch.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ function defaultNoopBatch(callback: () => void) {
66
let batch = defaultNoopBatch
77

88
// Allow injecting another batching function later
9-
export const setBatch = (newBatch: (callback: () => void) => void) => (batch = newBatch)
9+
export const setBatch = (newBatch: typeof defaultNoopBatch) =>
10+
(batch = newBatch)
1011

1112
// Supply a getter just to skip dealing with ESM bindings
1213
export const getBatch = () => batch

src/utils/bindActionCreators.ts

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import { ActionCreator, ActionCreatorsMapObject, AnyAction, Dispatch } from "redux"
1+
import {
2+
ActionCreator,
3+
ActionCreatorsMapObject,
4+
AnyAction,
5+
Dispatch,
6+
} from 'redux'
27

38
function bindActionCreator<A extends AnyAction = AnyAction>(
49
actionCreator: ActionCreator<A>,
@@ -9,7 +14,10 @@ function bindActionCreator<A extends AnyAction = AnyAction>(
914
}
1015
}
1116

12-
export default function bindActionCreators(actionCreators: ActionCreator<any> | ActionCreatorsMapObject, dispatch: Dispatch) {
17+
export default function bindActionCreators(
18+
actionCreators: ActionCreator<any> | ActionCreatorsMapObject,
19+
dispatch: Dispatch
20+
) {
1321
if (typeof actionCreators === 'function') {
1422
return bindActionCreator(actionCreators, dispatch)
1523
}

src/utils/reactBatchedUpdates.native.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable import/namespace */
12
/* eslint-disable import/named */
23
import { unstable_batchedUpdates } from 'react-native'
34

src/utils/verifyPlainObject.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import isPlainObject from './isPlainObject'
22
import warning from './warning'
33

4-
export default function verifyPlainObject(value: unknown, displayName: string, methodName: string) {
4+
export default function verifyPlainObject(
5+
value: unknown,
6+
displayName: string,
7+
methodName: string
8+
) {
59
if (!isPlainObject(value)) {
610
warning(
711
`${methodName}() in ${displayName} must return a plain object. Instead received ${value}.`

0 commit comments

Comments
 (0)