Skip to content

Commit 47a89d7

Browse files
committed
fix linter configuration and lint errors after eslint version was updated
1 parent 8e3652f commit 47a89d7

File tree

68 files changed

+649
-652
lines changed

Some content is hidden

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

68 files changed

+649
-652
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"react/jsx-closing-bracket-location": 2,
2929
"jsx-quotes": [2, "prefer-double"],
3030
"react/jsx-boolean-value": 2,
31-
"react/wrap-multilines": 2,
31+
"react/jsx-wrap-multilines": 2,
3232
"react/self-closing-comp": 2,
3333
"react/no-is-mounted": 2
3434
},

src/actions/loadUser.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ export function loadUserSuccess(dispatch, token) {
102102
}
103103
})
104104
})
105-
.catch((err) => {
105+
.catch((err) => {
106106
// if we fail to load user's profile, still dispatch user load success
107107
// ideally it shouldn't happen, but if it is, we can render the page
108108
// without profile information
109-
console.log(err)
110-
dispatch({ type: LOAD_USER_SUCCESS, user : currentUser })
111-
})
109+
console.log(err)
110+
dispatch({ type: LOAD_USER_SUCCESS, user : currentUser })
111+
})
112112
}
113113
}
114114

src/api/projectMembers.js

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,37 @@ export function getMembersById (userIds) {
1212
+ `&query=${encodeURIComponent(query)}`
1313
+ '&limit=' + userIds.length
1414
return axios.get(url)
15-
.then(resp => {
16-
return resp.data.result.content
17-
})
15+
.then(resp => {
16+
return resp.data.result.content
17+
})
1818
}
1919

2020
export function loadMemberSuggestions(value) {
2121
const url = `${TC_API_URL}/v3/members/_suggest/${value}`
2222
return axios.get(url)
23-
.then(resp => {
24-
return resp.data.result.content
25-
})
23+
.then(resp => {
24+
return resp.data.result.content
25+
})
2626
}
2727

2828

2929
export function addProjectMember(projectId, newMember) {
3030
const url = `${PROJECTS_API_URL}/v4/projects/${projectId}/members/`
3131
return axios.post(url, { param: newMember})
32-
.then(resp => {
33-
return axios.put(`${CONNECT_MESSAGE_API_URL}/v4/topics/syncUsers`,
34-
{ reference: 'project', referenceId: projectId })
35-
.then(() => resp.data.result.content)
36-
})
32+
.then(resp => {
33+
return axios.put(`${CONNECT_MESSAGE_API_URL}/v4/topics/syncUsers`,
34+
{ reference: 'project', referenceId: projectId })
35+
.then(() => resp.data.result.content)
36+
})
3737
}
3838

3939

4040
export function updateProjectMember(projectId, memberId, updatedProps) {
4141
const url = `${PROJECTS_API_URL}/v4/projects/${projectId}/members/${memberId}/`
4242
return axios.patch(url, { param: updatedProps })
43-
.then(resp => {
44-
return resp.data.result.content
45-
})
43+
.then(resp => {
44+
return resp.data.result.content
45+
})
4646
}
4747

4848
export function removeProjectMember(projectId, memberId, isUserLeaving) {
@@ -54,14 +54,14 @@ export function removeProjectMember(projectId, memberId, isUserLeaving) {
5454
}
5555
return promise.then(() => {
5656
return axios.delete(url)
57-
.then(() => {
58-
if (!isUserLeaving) {
59-
return axios.put(`${CONNECT_MESSAGE_API_URL}/v4/topics/syncUsers`,
60-
{ reference: 'project', referenceId: projectId })
61-
.then(() => memberId)
62-
}
63-
// return the member id just removed
64-
return memberId
65-
})
57+
.then(() => {
58+
if (!isUserLeaving) {
59+
return axios.put(`${CONNECT_MESSAGE_API_URL}/v4/topics/syncUsers`,
60+
{ reference: 'project', referenceId: projectId })
61+
.then(() => memberId)
62+
}
63+
// return the member id just removed
64+
return memberId
65+
})
6666
})
6767
}

src/components/ActionCard/ActionCard.jsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,20 @@ class Header extends React.Component{
5353
const content = topicMessage.newContent === null || topicMessage.newContent === undefined ? topicMessage.rawContent : topicMessage.newContent
5454
return (
5555
<RichTextArea
56-
editMode
57-
messageId={topicMessage.id}
58-
isGettingComment={topicMessage.isGettingComment}
59-
title={title}
60-
content={content}
61-
oldTitle={this.props.title}
62-
oldContent={topicMessage.rawContent}
63-
onPost={this.onSaveTopic}
64-
onPostChange={this.onTopicChange}
65-
isCreating={this.props.isSavingTopic}
66-
hasError={this.props.error}
67-
avatarUrl={this.props.avatarUrl}
68-
authorName={this.props.authorName}
69-
cancelEdit={this.cancelEditTopic}
56+
editMode
57+
messageId={topicMessage.id}
58+
isGettingComment={topicMessage.isGettingComment}
59+
title={title}
60+
content={content}
61+
oldTitle={this.props.title}
62+
oldContent={topicMessage.rawContent}
63+
onPost={this.onSaveTopic}
64+
onPostChange={this.onTopicChange}
65+
isCreating={this.props.isSavingTopic}
66+
hasError={this.props.error}
67+
avatarUrl={this.props.avatarUrl}
68+
authorName={this.props.authorName}
69+
cancelEdit={this.cancelEditTopic}
7070
/>
7171
)
7272
}

src/components/ActionCard/AddComment.jsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ export default class AddComment extends React.Component {
2929

3030
return (
3131
<RichTextArea ref="richTextArea"
32-
className={className}
33-
disableTitle
34-
contentPlaceholder={placeholder || 'New reply...'}
35-
onPost={this.onPost}
36-
onPostChange={this.onChange}
37-
isCreating={isAdding}
38-
hasError={hasError}
39-
avatarUrl={avatarUrl}
40-
authorName={authorName}
41-
allMembers={allMembers}
32+
className={className}
33+
disableTitle
34+
contentPlaceholder={placeholder || 'New reply...'}
35+
onPost={this.onPost}
36+
onPostChange={this.onChange}
37+
isCreating={isAdding}
38+
hasError={hasError}
39+
avatarUrl={avatarUrl}
40+
authorName={authorName}
41+
allMembers={allMembers}
4242
/>
4343
)
4444
}

src/components/ActionCard/Comment.jsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,20 @@ class Comment extends React.Component {
6161
const content = message.newContent === null || message.newContent === undefined ? message.rawContent : message.newContent
6262
return (
6363
<RichTextArea
64-
disableTitle
65-
editMode
66-
messageId={message.id}
67-
isGettingComment={message.isGettingComment}
68-
content={content}
69-
oldContent={message.rawContent}
70-
onPost={this.onSave}
71-
onPostChange={this.onChange}
72-
isCreating={isSaving}
73-
hasError={hasError}
74-
avatarUrl={avatarUrl}
75-
authorName={authorName}
76-
cancelEdit={this.cancelEdit}
77-
allMembers={allMembers}
64+
disableTitle
65+
editMode
66+
messageId={message.id}
67+
isGettingComment={message.isGettingComment}
68+
content={content}
69+
oldContent={message.rawContent}
70+
onPost={this.onSave}
71+
onPostChange={this.onChange}
72+
isCreating={isSaving}
73+
hasError={hasError}
74+
avatarUrl={avatarUrl}
75+
authorName={authorName}
76+
cancelEdit={this.cancelEdit}
77+
allMembers={allMembers}
7878
/>
7979
)
8080
}

src/components/ActionCard/CommentEditToggle.jsx

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -39,48 +39,48 @@ export default class CommentEditToggle extends React.Component {
3939
const editOptions = {label:this.props.forTopic ? 'Edit post' : 'Edit comment', val:'1'}
4040
const deleteOptions = {label:this.props.forTopic ? 'Delete post' : 'Delete comment', val:'2'}
4141
return (
42-
<div className="dropdownContainer">
43-
<Dropdown pointerShadow className="drop-down edit-toggle-container">
44-
<div className={cn('dropdown-menu-header', 'edit-toggle')} >
45-
<EditComment className="icon-edit-comment" />
46-
</div>
47-
<div className="dropdown-menu-list down-layer">
48-
<ul>
49-
<DropdownItem key={1} item={editOptions}
50-
onItemClick={this.onEdit}
51-
currentSelection=""
52-
/>
53-
{! this.props.hideDelete &&
42+
<div className="dropdownContainer">
43+
<Dropdown pointerShadow className="drop-down edit-toggle-container">
44+
<div className={cn('dropdown-menu-header', 'edit-toggle')} >
45+
<EditComment className="icon-edit-comment" />
46+
</div>
47+
<div className="dropdown-menu-list down-layer">
48+
<ul>
49+
<DropdownItem key={1} item={editOptions}
50+
onItemClick={this.onEdit}
51+
currentSelection=""
52+
/>
53+
{! this.props.hideDelete &&
5454
<DropdownItem key={2} item={deleteOptions}
5555
onItemClick={this.showDelete}
5656
currentSelection=""
5757
/>}
58-
</ul>
59-
</div>
60-
</Dropdown>
61-
<Modal
62-
isOpen={ showDeleteConfirm }
63-
className="delete-post-dialog"
64-
overlayClassName="delete-post-dialog-overlay"
65-
onRequestClose={ this.cancelDelete }
66-
contentLabel=""
67-
>
58+
</ul>
59+
</div>
60+
</Dropdown>
61+
<Modal
62+
isOpen={ showDeleteConfirm }
63+
className="delete-post-dialog"
64+
overlayClassName="delete-post-dialog-overlay"
65+
onRequestClose={ this.cancelDelete }
66+
contentLabel=""
67+
>
6868

69-
<div className="modal-title">
69+
<div className="modal-title">
7070
Are you sure you want to delete this post?
71-
</div>
71+
</div>
7272

73-
<div className="modal-body">
73+
<div className="modal-body">
7474
This action cannot be undone.
75-
</div>
75+
</div>
7676

77-
<div className="button-area flex center action-area">
78-
<button className="tc-btn tc-btn-default tc-btn-sm action-btn btn-cancel" onClick={this.cancelDelete}>Cancel</button>
79-
<button className="tc-btn tc-btn-warning tc-btn-sm action-btn " onClick={this.onDelete}>Delete Post</button>
80-
</div>
81-
</Modal>
77+
<div className="button-area flex center action-area">
78+
<button className="tc-btn tc-btn-default tc-btn-sm action-btn btn-cancel" onClick={this.cancelDelete}>Cancel</button>
79+
<button className="tc-btn tc-btn-warning tc-btn-sm action-btn " onClick={this.onDelete}>Delete Post</button>
80+
</div>
81+
</Modal>
8282

83-
</div>
83+
</div>
8484

8585

8686
)

src/components/AuthenticatedComponent.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export function requiresAuthentication(Component) {
3535
<div>
3636
{
3737
this.state.isLoggedIn === true
38-
? <Component { ...this.props}/>
39-
: null
38+
? <Component { ...this.props}/>
39+
: null
4040
}
4141
</div>
4242
)

src/components/CoderBot/CoderBot.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const CoderBot = ({code, message}) => {
3232
<div className="container">
3333
<div className="page-error">
3434
<h3>{ getHeading(code) }</h3>
35-
<p dangerouslySetInnerHTML={ {__html : message || getMessage(code) } }></p>
35+
<p dangerouslySetInnerHTML={ {__html : message || getMessage(code) } } />
3636
<CoderBroken className="icon-coder-broken" />
3737
<span>{code !== 200 && code}</span>
3838
</div>

src/components/ColorSelector/ColorSelector.jsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import './ColorSelector.scss'
99

1010

1111
class ColorSelector extends React.Component {
12-
12+
1313
constructor(props) {
1414
super(props)
1515

@@ -18,7 +18,7 @@ class ColorSelector extends React.Component {
1818
newColor: '#fff'
1919
}
2020
}
21-
21+
2222
render() {
2323
const {getValue, name, onChange, setValue, defaultColors } = this.props
2424
const value = getValue() || defaultColors
@@ -42,10 +42,10 @@ class ColorSelector extends React.Component {
4242

4343
updateNewColorPalette(newValue)
4444
}
45-
45+
4646
return (
4747
<div className="colorSelector">
48-
{value.map((color) =>
48+
{value.map((color) => (
4949
<a
5050
key={color}
5151
href="javascript:"
@@ -57,16 +57,16 @@ class ColorSelector extends React.Component {
5757
<CloseIcon />
5858
</span>
5959
</a>
60-
)}
60+
))}
6161

62-
{value.length < PROJECT_MAX_COLORS &&
62+
{value.length < PROJECT_MAX_COLORS &&
6363
<a
6464
href="javascript:"
6565
onClick={() => this.setState({isPickerVisible: true})}
6666
className="color-card"
6767
>
68-
<AddColor className="icon-card-add" />
69-
{isPickerVisible &&
68+
<AddColor className="icon-card-add" />
69+
{isPickerVisible &&
7070
<div className="picker-wrapper" onClick={(e) => e.stopPropagation()}>
7171
<SketchPicker
7272
color={newColor}
@@ -94,12 +94,12 @@ class ColorSelector extends React.Component {
9494
</button>
9595
</div>
9696
</div>
97-
}
98-
</a>}
97+
}
98+
</a>}
9999
</div>
100100
)
101101
}
102-
102+
103103
}
104104

105105
ColorSelector.propTypes = {

0 commit comments

Comments
 (0)