Unverified Commit 27a5b77f authored by Jesse Hallam's avatar Jesse Hallam Committed by GitHub

update eslint's `comma-dangle` rule to `always-multiline`. (#830)

* update eslint's `comma-dangle` rule to `always-multiline`

* Invoke `yarn fix` to adopt the updated eslint rules. No other changes are included.
parent e93497b5
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
"camelcase": [2, {"properties": "never"}], "camelcase": [2, {"properties": "never"}],
"capitalized-comments": 0, "capitalized-comments": 0,
"class-methods-use-this": 0, "class-methods-use-this": 0,
"comma-dangle": [2, "never"], "comma-dangle": [2, "always-multiline"],
"comma-spacing": [2, {"before": false, "after": true}], "comma-spacing": [2, {"before": false, "after": true}],
"comma-style": [2, "last"], "comma-style": [2, "last"],
"complexity": [1, 10], "complexity": [1, 10],
......
...@@ -283,20 +283,20 @@ export async function elasticsearchPurgeIndexes(success, error) { ...@@ -283,20 +283,20 @@ export async function elasticsearchPurgeIndexes(success, error) {
export function setNavigationBlocked(blocked) { export function setNavigationBlocked(blocked) {
return { return {
type: ActionTypes.SET_NAVIGATION_BLOCKED, type: ActionTypes.SET_NAVIGATION_BLOCKED,
blocked blocked,
}; };
} }
export function deferNavigation(onNavigationConfirmed) { export function deferNavigation(onNavigationConfirmed) {
return { return {
type: ActionTypes.DEFER_NAVIGATION, type: ActionTypes.DEFER_NAVIGATION,
onNavigationConfirmed onNavigationConfirmed,
}; };
} }
export function cancelNavigation() { export function cancelNavigation() {
return { return {
type: ActionTypes.CANCEL_NAVIGATION type: ActionTypes.CANCEL_NAVIGATION,
}; };
} }
...@@ -310,7 +310,7 @@ export function confirmNavigation() { ...@@ -310,7 +310,7 @@ export function confirmNavigation() {
} }
thunkDispatch({ thunkDispatch({
type: ActionTypes.CONFIRM_NAVIGATION type: ActionTypes.CONFIRM_NAVIGATION,
}); });
}; };
} }
...@@ -205,7 +205,7 @@ export async function openDirectChannelToUser(userId, success, error) { ...@@ -205,7 +205,7 @@ export async function openDirectChannelToUser(userId, success, error) {
const currentUserId = UserStore.getCurrentId(); const currentUserId = UserStore.getCurrentId();
savePreferences(currentUserId, [ savePreferences(currentUserId, [
{user_id: currentUserId, category: Preferences.CATEGORY_DIRECT_CHANNEL_SHOW, name: userId, value: 'true'}, {user_id: currentUserId, category: Preferences.CATEGORY_DIRECT_CHANNEL_SHOW, name: userId, value: 'true'},
{user_id: currentUserId, category: Preferences.CATEGORY_CHANNEL_OPEN_TIME, name: channel.id, value: now.toString()} {user_id: currentUserId, category: Preferences.CATEGORY_CHANNEL_OPEN_TIME, name: channel.id, value: now.toString()},
])(dispatch, getState); ])(dispatch, getState);
if (success) { if (success) {
...@@ -248,7 +248,7 @@ export function unmarkFavorite(channelId) { ...@@ -248,7 +248,7 @@ export function unmarkFavorite(channelId) {
const pref = { const pref = {
user_id: currentUserId, user_id: currentUserId,
category: Preferences.CATEGORY_FAVORITE_CHANNEL, category: Preferences.CATEGORY_FAVORITE_CHANNEL,
name: channelId name: channelId,
}; };
deletePreferences(currentUserId, [pref])(dispatch, getState); deletePreferences(currentUserId, [pref])(dispatch, getState);
......
...@@ -9,7 +9,7 @@ const SUPPORTS_MEASURE_METHODS = isSupported([ ...@@ -9,7 +9,7 @@ const SUPPORTS_MEASURE_METHODS = isSupported([
performance.measure, performance.measure,
performance.getEntries, performance.getEntries,
performance.getEntriesByName, performance.getEntriesByName,
performance.clearMeasures performance.clearMeasures,
]); ]);
export function trackEvent(category, event, props) { export function trackEvent(category, event, props) {
...@@ -17,16 +17,16 @@ export function trackEvent(category, event, props) { ...@@ -17,16 +17,16 @@ export function trackEvent(category, event, props) {
const properties = Object.assign({category, type: event, user_actual_id: UserStore.getCurrentId()}, props); const properties = Object.assign({category, type: event, user_actual_id: UserStore.getCurrentId()}, props);
const options = { const options = {
context: { context: {
ip: '0.0.0.0' ip: '0.0.0.0',
}, },
page: { page: {
path: '', path: '',
referrer: '', referrer: '',
search: '', search: '',
title: '', title: '',
url: '' url: '',
}, },
anonymousId: '00000000000000000000000000' anonymousId: '00000000000000000000000000',
}; };
global.window.analytics.track('event', properties, options); global.window.analytics.track('event', properties, options);
} }
......
...@@ -26,7 +26,7 @@ export async function deleteEmoji(emojiId, success, error) { ...@@ -26,7 +26,7 @@ export async function deleteEmoji(emojiId, success, error) {
// Needed to remove recently used emoji // Needed to remove recently used emoji
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.REMOVED_CUSTOM_EMOJI, type: ActionTypes.REMOVED_CUSTOM_EMOJI,
id: emojiId id: emojiId,
}); });
if (success) { if (success) {
...@@ -58,7 +58,7 @@ export function loadRecentlyUsedCustomEmojis() { ...@@ -58,7 +58,7 @@ export function loadRecentlyUsedCustomEmojis() {
export function incrementEmojiPickerPage() { export function incrementEmojiPickerPage() {
return async (dispatch) => { return async (dispatch) => {
dispatch({ dispatch({
type: ActionTypes.INCREMENT_EMOJI_PICKER_PAGE type: ActionTypes.INCREMENT_EMOJI_PICKER_PAGE,
}); });
return {data: true}; return {data: true};
......
...@@ -32,7 +32,7 @@ export function uploadFile(file, name, channelId, clientId, successCallback, err ...@@ -32,7 +32,7 @@ export function uploadFile(file, name, channelId, clientId, successCallback, err
clientIds: [clientId], clientIds: [clientId],
channelId, channelId,
rootId: null, rootId: null,
error: err error: err,
}; };
dispatch(batchActions([failure, getLogErrorAction(err)]), getState); dispatch(batchActions([failure, getLogErrorAction(err)]), getState);
...@@ -44,7 +44,7 @@ export function uploadFile(file, name, channelId, clientId, successCallback, err ...@@ -44,7 +44,7 @@ export function uploadFile(file, name, channelId, clientId, successCallback, err
const data = res.body.file_infos.map((fileInfo, index) => { const data = res.body.file_infos.map((fileInfo, index) => {
return { return {
...fileInfo, ...fileInfo,
clientId: res.body.client_ids[index] clientId: res.body.client_ids[index],
}; };
}); });
...@@ -53,11 +53,11 @@ export function uploadFile(file, name, channelId, clientId, successCallback, err ...@@ -53,11 +53,11 @@ export function uploadFile(file, name, channelId, clientId, successCallback, err
type: FileTypes.RECEIVED_UPLOAD_FILES, type: FileTypes.RECEIVED_UPLOAD_FILES,
data, data,
channelId, channelId,
rootId: null rootId: null,
}, },
{ {
type: FileTypes.UPLOAD_FILES_SUCCESS type: FileTypes.UPLOAD_FILES_SUCCESS,
} },
]), getState); ]), getState);
if (successCallback) { if (successCallback) {
......
...@@ -8,7 +8,7 @@ import { ...@@ -8,7 +8,7 @@ import {
getMyChannelMember, getMyChannelMember,
joinChannel, joinChannel,
markChannelAsRead, markChannelAsRead,
selectChannel selectChannel,
} from 'mattermost-redux/actions/channels'; } from 'mattermost-redux/actions/channels';
import {getPostThread} from 'mattermost-redux/actions/posts'; import {getPostThread} from 'mattermost-redux/actions/posts';
import {removeUserFromTeam} from 'mattermost-redux/actions/teams'; import {removeUserFromTeam} from 'mattermost-redux/actions/teams';
...@@ -70,7 +70,7 @@ export function emitChannelClickEvent(channel) { ...@@ -70,7 +70,7 @@ export function emitChannelClickEvent(channel) {
AppDispatcher.handleViewAction({ AppDispatcher.handleViewAction({
type: ActionTypes.CLICK_CHANNEL, type: ActionTypes.CLICK_CHANNEL,
id: chan.id, id: chan.id,
team_id: chan.team_id team_id: chan.team_id,
}); });
} }
...@@ -94,12 +94,12 @@ export async function doFocusPost(channelId, postId, data) { ...@@ -94,12 +94,12 @@ export async function doFocusPost(channelId, postId, data) {
type: ActionTypes.RECEIVED_FOCUSED_POST, type: ActionTypes.RECEIVED_FOCUSED_POST,
postId, postId,
channelId, channelId,
post_list: data post_list: data,
}); });
dispatch({ dispatch({
type: ActionTypes.RECEIVED_FOCUSED_POST, type: ActionTypes.RECEIVED_FOCUSED_POST,
data: postId data: postId,
}); });
const member = getState().entities.channels.myMembers[channelId]; const member = getState().entities.channels.myMembers[channelId];
...@@ -142,28 +142,28 @@ export function emitLeaveTeam() { ...@@ -142,28 +142,28 @@ export function emitLeaveTeam() {
export function emitUserPostedEvent(post) { export function emitUserPostedEvent(post) {
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.CREATE_POST, type: ActionTypes.CREATE_POST,
post post,
}); });
} }
export function emitUserCommentedEvent(post) { export function emitUserCommentedEvent(post) {
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.CREATE_COMMENT, type: ActionTypes.CREATE_COMMENT,
post post,
}); });
} }
export function showAccountSettingsModal() { export function showAccountSettingsModal() {
AppDispatcher.handleViewAction({ AppDispatcher.handleViewAction({
type: ActionTypes.TOGGLE_ACCOUNT_SETTINGS_MODAL, type: ActionTypes.TOGGLE_ACCOUNT_SETTINGS_MODAL,
value: true value: true,
}); });
} }
export function toggleShortcutsModal() { export function toggleShortcutsModal() {
AppDispatcher.handleViewAction({ AppDispatcher.handleViewAction({
type: ActionTypes.TOGGLE_SHORTCUTS_MODAL, type: ActionTypes.TOGGLE_SHORTCUTS_MODAL,
value: true value: true,
}); });
} }
...@@ -172,7 +172,7 @@ export function showDeletePostModal(post, commentCount = 0) { ...@@ -172,7 +172,7 @@ export function showDeletePostModal(post, commentCount = 0) {
type: ActionTypes.TOGGLE_DELETE_POST_MODAL, type: ActionTypes.TOGGLE_DELETE_POST_MODAL,
value: true, value: true,
post, post,
commentCount commentCount,
}); });
} }