Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump prettier from 1.19.1 to 2.2.1 #1147

Merged
merged 4 commits into from
Mar 5, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"semi": true,
"trailingComma": "es5",
"printWidth": 120,
"arrowParens": "avoid",
"endOfLine": "auto",
"overrides": [
{
"files": "*.{ts,tsx}",
Expand Down
4 changes: 2 additions & 2 deletions frontend/chat-plugin/src/websocket/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class WebSocket {
connectHeaders: {
Authorization: `Bearer ${token}`,
},
debug: function(str) {
debug: function (str) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

console.info(str);
},
reconnectDelay: 5000,
Expand All @@ -57,7 +57,7 @@ class WebSocket {

this.client.onConnect = this.onConnect;

this.client.onStompError = function(frame: IFrame) {
this.client.onStompError = function (frame: IFrame) {
console.error('Broker reported error: ' + frame.headers['message']);
console.error('Additional details: ' + frame.body);
};
Expand Down
2 changes: 1 addition & 1 deletion frontend/ui/src/actions/conversationsFilter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const setFilter = (filter: ConversationFilter) => {
};

export const resetFilter = () => {
return function(dispatch: Dispatch<any>, state: () => StateModel) {
return function (dispatch: Dispatch<any>, state: () => StateModel) {
dispatch(resetFilteredConversationAction());
const currentFilter = state().data.conversations.filtered.currentFilter;
const newFilter: ConversationFilter = {displayName: currentFilter.displayName};
Expand Down
10 changes: 5 additions & 5 deletions frontend/ui/src/actions/tags/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const filterTagAction = createAction(SET_TAG_FILTER, resolve => (filter:
export const errorTagAction = createAction(ERROR_TAG, resolve => (status: string) => resolve(status));

export function listTags() {
return function(dispatch: Dispatch<any>) {
return function (dispatch: Dispatch<any>) {
return HttpClientInstance.listTags().then((response: Tag[]) => {
dispatch(fetchTagAction(response));
});
Expand All @@ -41,27 +41,27 @@ export function createTag(requestPayload: CreateTagRequestPayload) {
}

export function updateTag(tag: Tag) {
return function(dispatch: Dispatch<any>) {
return function (dispatch: Dispatch<any>) {
HttpClientInstance.updateTag(tag).then(() => dispatch(editTagAction(tag)));
};
}

export function deleteTag(id: string) {
return function(dispatch: Dispatch<any>) {
return function (dispatch: Dispatch<any>) {
HttpClientInstance.deleteTag(id).then(() => {
dispatch(deleteTagAction(id));
});
};
}

export function filterTags(filter: string) {
return function(dispatch: Dispatch<any>) {
return function (dispatch: Dispatch<any>) {
dispatch(filterTagAction(filter));
};
}

export function errorTag(status: string) {
return function(dispatch: Dispatch<any>) {
return function (dispatch: Dispatch<any>) {
dispatch(errorTagAction(status));
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {ChannelPayload, ConnectChatPluginRequestPayload} from '../payload';
const camelcaseKeys = require('camelcase-keys');
import {HttpClient} from '../client';

export default HttpClient.prototype.connectChatPluginChannel = async function(
export default HttpClient.prototype.connectChatPluginChannel = async function (
requestPayload: ConnectChatPluginRequestPayload
) {
const response: ChannelPayload = await this.doFetchFromBackend(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {ChannelPayload, ConnectChannelRequestPayload} from '../payload';
const camelcaseKeys = require('camelcase-keys');
import {HttpClient} from '../client';

export default HttpClient.prototype.connectFacebookChannel = async function(
export default HttpClient.prototype.connectFacebookChannel = async function (
requestPayload: ConnectChannelRequestPayload
) {
const response: ChannelPayload = await this.doFetchFromBackend('channels.connect', camelcaseKeys(requestPayload));
Expand Down
2 changes: 1 addition & 1 deletion lib/typescript/httpclient/endpoints/disconnectChannel.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {DisconnectChannelRequestPayload} from '../payload';
import {HttpClient} from '../client';

export default HttpClient.prototype.disconnectChannel = async function(
export default HttpClient.prototype.disconnectChannel = async function (
source: string,
requestPayload: DisconnectChannelRequestPayload
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {ChannelsPayload, ExploreChannelRequestPayload} from '../payload';
const camelcaseKeys = require('camelcase-keys');
import {HttpClient} from '../client';

export default HttpClient.prototype.exploreFacebookChannels = async function(
export default HttpClient.prototype.exploreFacebookChannels = async function (
requestPayload: ExploreChannelRequestPayload
) {
const response: ChannelsPayload = await this.doFetchFromBackend('facebook.channels.explore', requestPayload);
Expand Down
2 changes: 1 addition & 1 deletion lib/typescript/httpclient/endpoints/getConversationInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {ConversationPayload} from '../payload';
const camelcaseKeys = require('camelcase-keys');
import {HttpClient} from '../client';

export default HttpClient.prototype.getConversationInfo = async function(conversationId: string) {
export default HttpClient.prototype.getConversationInfo = async function (conversationId: string) {
const response: ConversationPayload = await this.doFetchFromBackend('conversations.info', {
conversation_id: conversationId,
});
Expand Down
2 changes: 1 addition & 1 deletion lib/typescript/httpclient/endpoints/listChannels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {ChannelsPayload} from '../payload';
const camelcaseKeys = require('camelcase-keys');
import {HttpClient} from '../client';

export default HttpClient.prototype.listChannels = async function() {
export default HttpClient.prototype.listChannels = async function () {
const response: ChannelsPayload = await this.doFetchFromBackend('channels.list', {});

return camelcaseKeys(response.data, {deep: true, stopPaths: ['metadata.userData']});
Expand Down
2 changes: 1 addition & 1 deletion lib/typescript/httpclient/endpoints/listConversations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {PaginatedPayload, ConversationPayload, ListConversationsRequestPayload}
const camelcaseKeys = require('camelcase-keys');
import {HttpClient} from '../client';

export default HttpClient.prototype.listConversations = async function(
export default HttpClient.prototype.listConversations = async function (
conversationListRequest: ListConversationsRequestPayload
) {
conversationListRequest.page_size = conversationListRequest.page_size ?? 10;
Expand Down
4 changes: 3 additions & 1 deletion lib/typescript/httpclient/endpoints/listMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import {ListMessagesRequestPayload, PaginatedPayload, MessagePayload} from '../p
const camelcaseKeys = require('camelcase-keys');
import {HttpClient} from '../client';

export default HttpClient.prototype.listMessages = async function(conversationListRequest: ListMessagesRequestPayload) {
export default HttpClient.prototype.listMessages = async function (
conversationListRequest: ListMessagesRequestPayload
) {
conversationListRequest.pageSize = conversationListRequest.pageSize ?? 10;
conversationListRequest.cursor = conversationListRequest.cursor ?? null;

Expand Down
2 changes: 1 addition & 1 deletion lib/typescript/httpclient/endpoints/listTags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {ListTagsResponsePayload} from '../payload';
import {Tag} from '../model';
import {HttpClient} from '../client';

export default HttpClient.prototype.listTags = async function() {
export default HttpClient.prototype.listTags = async function () {
const response: ListTagsResponsePayload = await this.doFetchFromBackend('tags.list');

const tagMapper = {
Expand Down
2 changes: 1 addition & 1 deletion lib/typescript/httpclient/endpoints/readConversations.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {HttpClient} from '../client';

export default HttpClient.prototype.readConversations = async function(conversationId: string) {
export default HttpClient.prototype.readConversations = async function (conversationId: string) {
await this.doFetchFromBackend('conversations.read', {conversation_id: conversationId});
return Promise.resolve(true);
};
2 changes: 1 addition & 1 deletion lib/typescript/httpclient/endpoints/sendMessages.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {SendMessagesRequestPayload, MessagePayload} from '../payload';
import {HttpClient} from '../client';

export default HttpClient.prototype.sendMessages = async function(requestPayload: SendMessagesRequestPayload) {
export default HttpClient.prototype.sendMessages = async function (requestPayload: SendMessagesRequestPayload) {
const response: MessagePayload = await this.doFetchFromBackend('messages.send', {
conversation_id: requestPayload.conversationId,
message: requestPayload.message,
Expand Down
2 changes: 1 addition & 1 deletion lib/typescript/httpclient/endpoints/tagConversation.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {TagConversationRequestPayload} from '../payload';
import {HttpClient} from '../client';

export default HttpClient.prototype.tagConversation = async function(requestPayload: TagConversationRequestPayload) {
export default HttpClient.prototype.tagConversation = async function (requestPayload: TagConversationRequestPayload) {
await this.doFetchFromBackend('conversations.tag', {
conversation_id: requestPayload.conversationId,
tag_id: requestPayload.tagId,
Expand Down
2 changes: 1 addition & 1 deletion lib/typescript/httpclient/endpoints/updateChannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {ChannelPayload, UpdateChannelRequestPayload} from '../payload';
const camelcaseKeys = require('camelcase-keys');
import {HttpClient} from '../client';

export default HttpClient.prototype.updateChannel = async function(requestPayload: UpdateChannelRequestPayload) {
export default HttpClient.prototype.updateChannel = async function (requestPayload: UpdateChannelRequestPayload) {
const response: ChannelPayload = await this.doFetchFromBackend(`channels.update`, {
channel_id: requestPayload.channelId,
name: requestPayload.name,
Expand Down
2 changes: 1 addition & 1 deletion lib/typescript/httpclient/endpoints/updateTag.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Tag} from '../model';
import {HttpClient} from '../client';

export default HttpClient.prototype.updateTag = async function(tag: Tag) {
export default HttpClient.prototype.updateTag = async function (tag: Tag) {
await this.doFetchFromBackend('tags.update', {...tag});
return Promise.resolve(true);
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"html-webpack-plugin": "^4.2.0",
"minimist": "^1.2.5",
"node-sass": "^4.14.0",
"prettier": "^1.19.1",
"prettier": "^2.2.1",
"react-hot-loader": "^4.13.0",
"reselect": "4.0.0",
"sass-loader": "^8.0.2",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7395,10 +7395,10 @@ prelude-ls@^1.2.1:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==

prettier@^1.19.1:
version "1.19.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz"
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
prettier@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5"
integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==

pretty-bytes@^5.4.1:
version "5.6.0"
Expand Down