Skip to content

Commit b54bc75

Browse files
authored
Remove prop-types (reduxjs#1557)
1 parent 37fee55 commit b54bc75

File tree

62 files changed

+4
-642
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+4
-642
lines changed

packages/react-dock/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@
4141
"dependencies": {
4242
"@babel/runtime": "^7.23.5",
4343
"@types/lodash": "^4.14.202",
44-
"@types/prop-types": "^15.7.11",
45-
"lodash.debounce": "^4.0.8",
46-
"prop-types": "^15.8.1"
44+
"lodash.debounce": "^4.0.8"
4745
},
4846
"devDependencies": {
4947
"@babel/cli": "^7.23.4",

packages/react-dock/src/Dock.tsx

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { Component, ReactNode } from 'react';
2-
import PropTypes from 'prop-types';
32
import debounce from 'lodash.debounce';
43
import type { DebouncedFunc } from 'lodash';
54
import autoprefix from './autoprefix';
@@ -260,21 +259,6 @@ export default class Dock extends Component<Props, State> {
260259
isWindowResizing: false,
261260
};
262261

263-
static propTypes = {
264-
position: PropTypes.oneOf(['left', 'right', 'top', 'bottom']),
265-
zIndex: PropTypes.number,
266-
fluid: PropTypes.bool,
267-
size: PropTypes.number,
268-
defaultSize: PropTypes.number,
269-
dimMode: PropTypes.oneOf(['none', 'transparent', 'opaque']),
270-
isVisible: PropTypes.bool,
271-
onVisibleChange: PropTypes.func,
272-
onSizeChange: PropTypes.func,
273-
dimStyle: PropTypes.object,
274-
dockStyle: PropTypes.object,
275-
duration: PropTypes.number,
276-
};
277-
278262
static defaultProps = {
279263
position: 'left',
280264
zIndex: 99999999,

packages/redux-devtools-app/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,12 @@
5151
"@redux-devtools/slider-monitor": "^4.1.0",
5252
"@redux-devtools/ui": "^1.3.1",
5353
"@reduxjs/toolkit": "^1.9.7",
54-
"@types/prop-types": "^15.7.11",
5554
"d3-state-visualizer": "^2.0.0",
5655
"javascript-stringify": "^2.1.0",
5756
"jsan": "^3.1.14",
5857
"jsondiffpatch": "^0.5.0",
5958
"localforage": "^1.10.0",
6059
"lodash": "^4.17.21",
61-
"prop-types": "^15.8.1",
6260
"react-icons": "^4.12.0",
6361
"react-is": "^18.2.0",
6462
"react-redux": "^8.1.3",

packages/redux-devtools-app/src/components/BottomButtons.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import React, { Component } from 'react';
2-
import PropTypes from 'prop-types';
3-
import { Button, Toolbar, Divider } from '@redux-devtools/ui';
4-
import { MdSave } from 'react-icons/md';
2+
import { Toolbar, Divider } from '@redux-devtools/ui';
53
import ExportButton from './buttons/ExportButton';
64
import ImportButton from './buttons/ImportButton';
75
import PrintButton from './buttons/PrintButton';
@@ -17,12 +15,6 @@ interface Props {
1715
}
1816

1917
export default class BottomButtons extends Component<Props> {
20-
static propTypes = {
21-
dispatcherIsOpen: PropTypes.bool,
22-
sliderIsOpen: PropTypes.bool,
23-
options: PropTypes.object.isRequired,
24-
};
25-
2618
shouldComponentUpdate(nextProps: Props) {
2719
return (
2820
nextProps.dispatcherIsOpen !== this.props.dispatcherIsOpen ||

packages/redux-devtools-app/src/components/TopButtons.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { Component } from 'react';
2-
import PropTypes from 'prop-types';
32
import { ActionCreators, LiftedAction } from '@redux-devtools/core';
43
import { Button, Toolbar, Divider } from '@redux-devtools/ui';
54
import { Action } from 'redux';
@@ -20,13 +19,6 @@ interface Props {
2019
}
2120

2221
export default class TopButtons extends Component<Props> {
23-
static propTypes = {
24-
// shouldSync: PropTypes.bool,
25-
liftedState: PropTypes.object.isRequired,
26-
dispatch: PropTypes.func.isRequired,
27-
options: PropTypes.object.isRequired,
28-
};
29-
3022
shouldComponentUpdate(nextProps: Props) {
3123
return (
3224
nextProps.options !== this.props.options ||

packages/redux-devtools-app/src/components/buttons/PersistButton.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { Component } from 'react';
2-
import PropTypes from 'prop-types';
32
import { connect, ResolveThunks } from 'react-redux';
43
import { Button } from '@redux-devtools/ui';
54
import { FaThumbtack } from 'react-icons/fa';

packages/redux-devtools-dock-monitor/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@
4242
},
4343
"dependencies": {
4444
"@babel/runtime": "^7.23.5",
45-
"@types/prop-types": "^15.7.11",
4645
"parse-key": "^0.2.1",
47-
"prop-types": "^15.8.1",
4846
"react-dock": "^0.6.0"
4947
},
5048
"devDependencies": {

packages/redux-devtools-dock-monitor/src/DockMonitor.tsx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import React, { cloneElement, Children, Component } from 'react';
2-
import PropTypes from 'prop-types';
32
import { Dock } from 'react-dock';
43
import { Action, Dispatch } from 'redux';
54
import { LiftedState, Monitor } from '@redux-devtools/core';
6-
import { POSITIONS } from './constants';
75
import {
86
toggleVisibility,
97
changeMonitor,
@@ -68,24 +66,6 @@ class DockMonitor<S, A extends Action<string>> extends Component<
6866
> {
6967
static update = reducer;
7068

71-
static propTypes = {
72-
defaultPosition: PropTypes.oneOf(POSITIONS),
73-
defaultIsVisible: PropTypes.bool.isRequired,
74-
defaultSize: PropTypes.number.isRequired,
75-
toggleVisibilityKey: PropTypes.string.isRequired,
76-
changePositionKey: PropTypes.string.isRequired,
77-
changeMonitorKey: PropTypes.string,
78-
fluid: PropTypes.bool,
79-
80-
dispatch: PropTypes.func,
81-
monitorState: PropTypes.shape({
82-
position: PropTypes.oneOf(POSITIONS).isRequired,
83-
size: PropTypes.number.isRequired,
84-
isVisible: PropTypes.bool.isRequired,
85-
childMonitorState: PropTypes.any,
86-
}),
87-
};
88-
8969
static defaultProps: DefaultProps = {
9070
defaultIsVisible: true,
9171
defaultPosition: 'right',

packages/redux-devtools-inspector-monitor-test-tab/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,10 @@
4545
"dependencies": {
4646
"@babel/runtime": "^7.23.5",
4747
"@redux-devtools/ui": "^1.3.1",
48-
"@types/prop-types": "^15.7.11",
4948
"es6template": "^1.0.5",
5049
"javascript-stringify": "^2.1.0",
5150
"jsan": "^3.1.14",
5251
"object-path": "^0.11.8",
53-
"prop-types": "^15.8.1",
5452
"react-icons": "^4.12.0",
5553
"simple-diff": "^1.7.2"
5654
},

packages/redux-devtools-inspector-monitor-test-tab/src/index.tsx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { Component } from 'react';
2-
import PropTypes from 'prop-types';
32
import {
43
Toolbar,
54
Container,
@@ -185,22 +184,6 @@ export class TestTab<S, A extends Action<string>> extends Component<
185184
</Container>
186185
);
187186
}
188-
189-
static propTypes = {
190-
monitorState: PropTypes.shape({
191-
testGenerator: PropTypes.shape({
192-
templates: PropTypes.array,
193-
selected: PropTypes.number,
194-
hideTip: PropTypes.bool,
195-
}),
196-
}).isRequired,
197-
/*
198-
options: PropTypes.shape({
199-
lib: PropTypes.string
200-
}).isRequired,
201-
*/
202-
updateMonitorState: PropTypes.func.isRequired,
203-
};
204187
}
205188

206189
export { default as reduxAvaTemplate } from './redux/ava';

0 commit comments

Comments
 (0)