Skip to content

Commit f3079ed

Browse files
authored
Merge pull request #1692 from KKVANONYMOUS/develop
Fix PropTypes.object() linting errors
2 parents 6edd547 + 5c3d823 commit f3079ed

File tree

10 files changed

+19
-19
lines changed

10 files changed

+19
-19
lines changed

Diff for: client/components/mobile/ActionStrip.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const ActionStrip = ({ actions }) => (
3838

3939
ActionStrip.propTypes = {
4040
actions: PropTypes.arrayOf(PropTypes.shape({
41-
icon: PropTypes.any,
41+
icon: PropTypes.component,
4242
aria: PropTypes.string.isRequired,
4343
action: PropTypes.func.isRequired,
4444
inverted: PropTypes.bool

Diff for: client/modules/IDE/components/NewFileForm.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class NewFileForm extends React.Component {
5858

5959
NewFileForm.propTypes = {
6060
fields: PropTypes.shape({
61-
name: PropTypes.object.isRequired
61+
name: PropTypes.objectOf(PropTypes.shape()).isRequired
6262
}).isRequired,
6363
handleSubmit: PropTypes.func.isRequired,
6464
createFile: PropTypes.func.isRequired,

Diff for: client/modules/IDE/components/NewFolderForm.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class NewFolderForm extends React.Component {
5656

5757
NewFolderForm.propTypes = {
5858
fields: PropTypes.shape({
59-
name: PropTypes.object.isRequired
59+
name: PropTypes.objectOf(PropTypes.shape()).isRequired
6060
}).isRequired,
6161
handleSubmit: PropTypes.func.isRequired,
6262
createFolder: PropTypes.func.isRequired,

Diff for: client/modules/IDE/pages/IDEView.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ IDEView.propTypes = {
495495
updatedAt: PropTypes.string,
496496
}).isRequired,
497497
editorAccessibility: PropTypes.shape({
498-
lintMessages: PropTypes.array.isRequired, // eslint-disable-line
498+
lintMessages: PropTypes.objectOf(PropTypes.shape()).isRequired,
499499
}).isRequired,
500500
preferences: PropTypes.shape({
501501
autosave: PropTypes.bool.isRequired,

Diff for: client/modules/User/components/APIKeyForm.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import CopyableInput from '../../IDE/components/CopyableInput';
77
import APIKeyList from './APIKeyList';
88

99
export const APIKeyPropType = PropTypes.shape({
10-
id: PropTypes.object.isRequired, // eslint-disable-line
11-
token: PropTypes.object, // eslint-disable-line
10+
id: PropTypes.objectOf(PropTypes.shape()).isRequired,
11+
token: PropTypes.objectOf(PropTypes.shape()),
1212
label: PropTypes.string.isRequired,
1313
createdAt: PropTypes.string.isRequired,
1414
lastUsedAt: PropTypes.string

Diff for: client/modules/User/components/AccountForm.jsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ function AccountForm(props) {
109109

110110
AccountForm.propTypes = {
111111
fields: PropTypes.shape({
112-
username: PropTypes.object.isRequired, // eslint-disable-line
113-
email: PropTypes.object.isRequired, // eslint-disable-line
114-
currentPassword: PropTypes.object.isRequired, // eslint-disable-line
115-
newPassword: PropTypes.object.isRequired, // eslint-disable-line
112+
username: PropTypes.objectOf(PropTypes.shape()).isRequired,
113+
email: PropTypes.objectOf(PropTypes.shape()).isRequired,
114+
currentPassword: PropTypes.objectOf(PropTypes.shape()).isRequired,
115+
newPassword: PropTypes.objectOf(PropTypes.shape()).isRequired,
116116
}).isRequired,
117117
user: PropTypes.shape({
118118
verified: PropTypes.string.isRequired,

Diff for: client/modules/User/components/LoginForm.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ function LoginForm(props) {
5454

5555
LoginForm.propTypes = {
5656
fields: PropTypes.shape({
57-
email: PropTypes.object.isRequired, // eslint-disable-line
58-
password: PropTypes.object.isRequired, // eslint-disable-line
57+
email: PropTypes.objectOf(PropTypes.shape()).isRequired,
58+
password: PropTypes.objectOf(PropTypes.shape()).isRequired,
5959
}).isRequired,
6060
handleSubmit: PropTypes.func.isRequired,
6161
validateAndLoginUser: PropTypes.func.isRequired,

Diff for: client/modules/User/components/NewPasswordForm.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ function NewPasswordForm(props) {
4747

4848
NewPasswordForm.propTypes = {
4949
fields: PropTypes.shape({
50-
password: PropTypes.object.isRequired, // eslint-disable-line
51-
confirmPassword: PropTypes.object.isRequired, // eslint-disable-line
50+
password: PropTypes.objectOf(PropTypes.shape()).isRequired,
51+
confirmPassword: PropTypes.objectOf(PropTypes.shape()).isRequired,
5252
}).isRequired,
5353
handleSubmit: PropTypes.func.isRequired,
5454
updatePassword: PropTypes.func.isRequired,

Diff for: client/modules/User/components/ResetPasswordForm.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function ResetPasswordForm(props) {
3737

3838
ResetPasswordForm.propTypes = {
3939
fields: PropTypes.shape({
40-
email: PropTypes.object.isRequired
40+
email: PropTypes.objectOf(PropTypes.shape()).isRequired
4141
}).isRequired,
4242
handleSubmit: PropTypes.func.isRequired,
4343
initiateResetPassword: PropTypes.func.isRequired,

Diff for: client/modules/User/components/SignupForm.jsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ function SignupForm(props) {
8383

8484
SignupForm.propTypes = {
8585
fields: PropTypes.shape({
86-
username: PropTypes.object.isRequired, // eslint-disable-line
87-
email: PropTypes.object.isRequired, // eslint-disable-line
88-
password: PropTypes.object.isRequired, // eslint-disable-line
89-
confirmPassword: PropTypes.object.isRequired, // eslint-disable-line
86+
username: PropTypes.objectOf(PropTypes.shape()).isRequired,
87+
email: PropTypes.objectOf(PropTypes.shape()).isRequired,
88+
password: PropTypes.objectOf(PropTypes.shape()).isRequired,
89+
confirmPassword: PropTypes.objectOf(PropTypes.shape()).isRequired,
9090
}).isRequired,
9191
handleSubmit: PropTypes.func.isRequired,
9292
signUpUser: PropTypes.func.isRequired,

0 commit comments

Comments
 (0)