From dba214942465cdb18a0a71163943dc73407c10b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kr=C3=A6n=20Hansen?= Date: Mon, 23 Sep 2019 14:35:33 +0200 Subject: [PATCH] Updating Prettier & comitting fixes --- package-lock.json | 51 ++++++------------- package.json | 2 +- src/main/CertificateManager.ts | 4 +- src/main/CloudManager.ts | 4 +- .../data-importer/csv/CSVDataImporter.ts | 6 +-- .../schema-export/languages/csharp.ts | 4 +- .../Greeting/MarketingPanel/MessageSlide.tsx | 4 +- src/windows/CloudAuthenticationWindow.tsx | 4 +- src/windows/ConnectToServerWindow.tsx | 4 +- src/windows/GraphiqlEditorWindow.tsx | 4 +- src/windows/ServerAdministrationWindow.tsx | 4 +- 11 files changed, 33 insertions(+), 58 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9b0a000e5..fb2708832 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1587,7 +1587,6 @@ "resolved": "https://registry.npmjs.org/boom/-/boom-0.4.2.tgz", "integrity": "sha1-emNune1O/O+xnO9JR6PGffrukRs=", "dev": true, - "optional": true, "requires": { "hoek": "0.9.x" } @@ -5267,8 +5266,7 @@ "version": "2.1.1", "resolved": false, "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -5292,15 +5290,13 @@ "version": "1.0.0", "resolved": false, "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "resolved": false, "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5316,20 +5312,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -5460,8 +5453,7 @@ "version": "2.0.3", "resolved": false, "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -5475,7 +5467,6 @@ "resolved": false, "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -5492,7 +5483,6 @@ "resolved": false, "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -5501,15 +5491,13 @@ "version": "0.0.8", "resolved": false, "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.3.5", "resolved": false, "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -5530,7 +5518,6 @@ "resolved": false, "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -5619,8 +5606,7 @@ "version": "1.0.1", "resolved": false, "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -5634,7 +5620,6 @@ "resolved": false, "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -5730,8 +5715,7 @@ "version": "5.1.2", "resolved": false, "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -5773,7 +5757,6 @@ "resolved": false, "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -5795,7 +5778,6 @@ "resolved": false, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -5844,15 +5826,13 @@ "version": "1.0.2", "resolved": false, "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.3", "resolved": false, "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "dev": true, - "optional": true + "dev": true } } }, @@ -6548,8 +6528,7 @@ "version": "0.9.1", "resolved": "https://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz", "integrity": "sha1-PTIkYrrfB3Fup+uFuviAec3c5QU=", - "dev": true, - "optional": true + "dev": true }, "hoist-non-react-statics": { "version": "3.3.0", @@ -10864,9 +10843,9 @@ "dev": true }, "prettier": { - "version": "1.16.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.16.4.tgz", - "integrity": "sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g==", + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.18.2.tgz", + "integrity": "sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==", "dev": true }, "pretty-bytes": { diff --git a/package.json b/package.json index 710b80c4a..c1459240b 100644 --- a/package.json +++ b/package.json @@ -222,7 +222,7 @@ "mocha-webpack": "2.0.0-beta.0", "node-sass": "^4.11.0", "null-loader": "^0.1.1", - "prettier": "^1.16.4", + "prettier": "^1.18.2", "react-hot-loader": "^4.8.3", "remark": "^10.0.1", "resolve-url-loader": "^3.1.0", diff --git a/src/main/CertificateManager.ts b/src/main/CertificateManager.ts index ebe449e28..50819eaef 100644 --- a/src/main/CertificateManager.ts +++ b/src/main/CertificateManager.ts @@ -76,9 +76,7 @@ export class CertificateManager { enableDetailedButton: boolean = true, ): Promise { const parsedUrl = new URL(url); - const coreMessage = `The server (${ - parsedUrl.host - }) is using a certificate that cannot be automatically trusted.`; + const coreMessage = `The server (${parsedUrl.host}) is using a certificate that cannot be automatically trusted.`; const description = this.describeCertificate(certificate); const buttons = ['Yes - I trust it!', 'No!']; if (enableDetailedButton) { diff --git a/src/main/CloudManager.ts b/src/main/CloudManager.ts index 0cdc0248b..fcc276ca4 100644 --- a/src/main/CloudManager.ts +++ b/src/main/CloudManager.ts @@ -184,9 +184,7 @@ export class CloudManager { const response = await timeout( CloudManager.AUTHENTICATION_TIMEOUT, new Error( - `Request timed out (waited ${ - CloudManager.AUTHENTICATION_TIMEOUT - } ms)`, + `Request timed out (waited ${CloudManager.AUTHENTICATION_TIMEOUT} ms)`, ), performAuthentication(), ); diff --git a/src/services/data-importer/csv/CSVDataImporter.ts b/src/services/data-importer/csv/CSVDataImporter.ts index 246d01bb5..dc724fc8f 100644 --- a/src/services/data-importer/csv/CSVDataImporter.ts +++ b/src/services/data-importer/csv/CSVDataImporter.ts @@ -71,11 +71,7 @@ export class CSVDataImporter extends DataImporter { // abort transaction and delete the Realm realm.cancelTransaction(); throw new Error( - `Parsing error at line ${lineIndex}, expected type "${ - schema.properties[prop] - }" but got "${ - row[prop] - }" for column "${prop}"\nError details: ${e}`, + `Parsing error at line ${lineIndex}, expected type "${schema.properties[prop]}" but got "${row[prop]}" for column "${prop}"\nError details: ${e}`, ); } } diff --git a/src/services/schema-export/languages/csharp.ts b/src/services/schema-export/languages/csharp.ts index 8faf590a5..5807b9084 100644 --- a/src/services/schema-export/languages/csharp.ts +++ b/src/services/schema-export/languages/csharp.ts @@ -135,9 +135,7 @@ export default class CSharpSchemaExporter extends SchemaExporter { } this.appendLine( - `${this.PropertyPadding}public ${prop.type} ${prop.name} { get;${ - prop.setter - } }`, + `${this.PropertyPadding}public ${prop.type} ${prop.name} { get;${prop.setter} }`, ); } diff --git a/src/ui/Greeting/MarketingPanel/MessageSlide.tsx b/src/ui/Greeting/MarketingPanel/MessageSlide.tsx index eedf1b0c7..da3f69c0d 100644 --- a/src/ui/Greeting/MarketingPanel/MessageSlide.tsx +++ b/src/ui/Greeting/MarketingPanel/MessageSlide.tsx @@ -92,9 +92,7 @@ const renderNode: { [key: string]: NodeRenderer } = { } else if (entry.sys.contentType) { // tslint:disable-next-line:no-console console.warn( - `Rendering unsupported embedded entry of type ${ - entry.sys.contentType.sys.id - }`, + `Rendering unsupported embedded entry of type ${entry.sys.contentType.sys.id}`, ); return ''; } else { diff --git a/src/windows/CloudAuthenticationWindow.tsx b/src/windows/CloudAuthenticationWindow.tsx index c155f4af6..a3d1610da 100644 --- a/src/windows/CloudAuthenticationWindow.tsx +++ b/src/windows/CloudAuthenticationWindow.tsx @@ -32,7 +32,9 @@ export const CloudAuthenticationWindow: IWindow = { }; }, getComponent: () => - import(/* webpackChunkName: "cloud-authentication" */ '../ui/CloudAuthentication').then( + import( + /* webpackChunkName: "cloud-authentication" */ '../ui/CloudAuthentication' + ).then( // TODO: Fix the props for this to include a type m => m.CloudAuthentication as any, ), diff --git a/src/windows/ConnectToServerWindow.tsx b/src/windows/ConnectToServerWindow.tsx index bae630a91..4905de466 100644 --- a/src/windows/ConnectToServerWindow.tsx +++ b/src/windows/ConnectToServerWindow.tsx @@ -32,7 +32,9 @@ export const ConnectToServerWindow: IWindow = { autoHideMenuBar: true, }), getComponent: () => - import(/* webpackChunkName: "connect-to-server" */ '../ui/ConnectToServer').then( + import( + /* webpackChunkName: "connect-to-server" */ '../ui/ConnectToServer' + ).then( // TODO: Fix the props for this to include a type m => m.ConnectToServer as any, ), diff --git a/src/windows/GraphiqlEditorWindow.tsx b/src/windows/GraphiqlEditorWindow.tsx index 345e93eb0..c19faf46f 100644 --- a/src/windows/GraphiqlEditorWindow.tsx +++ b/src/windows/GraphiqlEditorWindow.tsx @@ -39,7 +39,9 @@ export const GraphiqlEditorWindow: IWindow = { }; }, getComponent: () => - import(/* webpackChunkName: "graphiql-editor" */ '../ui/GraphiqlEditor').then( + import( + /* webpackChunkName: "graphiql-editor" */ '../ui/GraphiqlEditor' + ).then( // TODO: Fix the props for this to include a type m => m.GraphiqlEditor as any, ), diff --git a/src/windows/ServerAdministrationWindow.tsx b/src/windows/ServerAdministrationWindow.tsx index d93540173..c163364ef 100644 --- a/src/windows/ServerAdministrationWindow.tsx +++ b/src/windows/ServerAdministrationWindow.tsx @@ -36,7 +36,9 @@ export const ServerAdministrationWindow: IWindow = { }; }, getComponent: () => - import(/* webpackChunkName: "server-administration" */ '../ui/ServerAdministration').then( + import( + /* webpackChunkName: "server-administration" */ '../ui/ServerAdministration' + ).then( // TODO: Fix the props for this to include a type m => m.ServerAdministration as any, ),