diff --git a/extensions/eclipse-che-theia-plugin-ext/package.json b/extensions/eclipse-che-theia-plugin-ext/package.json index 6b93db374..3457b0d09 100644 --- a/extensions/eclipse-che-theia-plugin-ext/package.json +++ b/extensions/eclipse-che-theia-plugin-ext/package.json @@ -13,25 +13,27 @@ "src" ], "dependencies": { - "@theia/core": "0.3.18", - "@theia/plugin-ext": "0.3.18", "@eclipse-che/plugin": "latest", - "@eclipse-che/workspace-client": "^0.0.1-1546509769" + "@eclipse-che/workspace-client": "^0.0.1-1546509769", + "@theia/core": "0.3.18", + "@theia/plugin-ext": "0.3.18" }, "devDependencies": { + "clean-webpack-plugin": "^0.1.19", "rimraf": "2.6.2", + "ts-loader": "^4.1.0", "ts-node": "5.0.1", "typescript": "^2.9.2", + "typescript-formatter": "7.2.2", "webpack": "^4.20.2", - "webpack-cli": "^3.1.1", - "clean-webpack-plugin": "^0.1.19", - "ts-loader": "^4.1.0" + "webpack-cli": "^3.1.1" }, "scripts": { "prepare": "yarn run clean && yarn run build", "clean": "rimraf lib", "compile": "tsc", - "build": "yarn run compile && yarn run compileWorker", + "format-code": "tsfmt -r", + "build": "yarn run format-code && yarn run compile && yarn run compileWorker", "compileWorker": "webpack-cli --config webpack.config.js", "watch": "tsc -w" }, diff --git a/extensions/eclipse-che-theia-plugin-ext/src/browser/che-variables-main.ts b/extensions/eclipse-che-theia-plugin-ext/src/browser/che-variables-main.ts index 7d52a4c40..87b1351ee 100644 --- a/extensions/eclipse-che-theia-plugin-ext/src/browser/che-variables-main.ts +++ b/extensions/eclipse-che-theia-plugin-ext/src/browser/che-variables-main.ts @@ -28,7 +28,7 @@ export class CheVariablesMainImpl implements CheVariablesMain { this.disposableMap = new Map() } - async $registerVariable(variable: Variable ): Promise { + async $registerVariable(variable: Variable): Promise { const handle = (id: number) => { return this.proxy.$resolveVariable(id); }; diff --git a/extensions/eclipse-che-theia-plugin-ext/src/plugin/che-api.ts b/extensions/eclipse-che-theia-plugin-ext/src/plugin/che-api.ts index 87998fa6a..b6f7bd5d1 100644 --- a/extensions/eclipse-che-theia-plugin-ext/src/plugin/che-api.ts +++ b/extensions/eclipse-che-theia-plugin-ext/src/plugin/che-api.ts @@ -26,7 +26,7 @@ export function createAPIFactory(rpc: RPCProtocol): CheApiFactory { const cheFactoryImpl = rpc.set(PLUGIN_RPC_CONTEXT.CHE_FACTORY, new CheFactoryImpl(rpc)); const cheVariablesImpl = rpc.set(PLUGIN_RPC_CONTEXT.CHE_VARIABLES, new CheVariablesImpl(rpc)); - return function (plugin: Plugin): typeof che { + return function(plugin: Plugin): typeof che { const workspace: typeof che.workspace = { getCurrentWorkspace(): Promise { return cheWorkspaceImpl.getCurrentWorkspace(); diff --git a/extensions/eclipse-che-theia-plugin-ext/src/plugin/che-variables.ts b/extensions/eclipse-che-theia-plugin-ext/src/plugin/che-variables.ts index 258020206..6d28d2f48 100644 --- a/extensions/eclipse-che-theia-plugin-ext/src/plugin/che-variables.ts +++ b/extensions/eclipse-che-theia-plugin-ext/src/plugin/che-variables.ts @@ -12,7 +12,7 @@ import { RPCProtocol } from '@theia/plugin-ext/lib/api/rpc-protocol'; import { PLUGIN_RPC_CONTEXT, CheVariables, CheVariablesMain } from '../common/che-protocol'; import * as che from '@eclipse-che/plugin'; -export class CheVariablesImpl implements CheVariables{ +export class CheVariablesImpl implements CheVariables { private readonly cheVariablesMain: CheVariablesMain; private readonly variablesCache = new Map(); @@ -38,7 +38,7 @@ export class CheVariablesImpl implements CheVariables{ } private addNewVariable(variable: che.Variable): number { - const callId = this.callId ++; + const callId = this.callId++; this.variablesCache.set(callId, variable); return callId; } @@ -49,7 +49,7 @@ export class CheVariablesImpl implements CheVariables{ async $resolveVariable(variableId: number): Promise { const variable = this.variablesCache.get(variableId); - if (variable ) { + if (variable) { if (variable.isResolved && variable.value) { return variable.value; } diff --git a/extensions/eclipse-che-theia-plugin-ext/src/plugin/node/che-api-node-provider.ts b/extensions/eclipse-che-theia-plugin-ext/src/plugin/node/che-api-node-provider.ts index c3ef16604..59eaca60a 100644 --- a/extensions/eclipse-che-theia-plugin-ext/src/plugin/node/che-api-node-provider.ts +++ b/extensions/eclipse-che-theia-plugin-ext/src/plugin/node/che-api-node-provider.ts @@ -38,7 +38,7 @@ function overrideInternalLoad(): void { // if we try to resolve che module, return the filename entry to use cache. // tslint:disable-next-line:no-any - module._load = function (request: string, parent: any, isMain: {}) { + module._load = function(request: string, parent: any, isMain: {}) { if (request !== '@eclipse-che/plugin') { return internalLoad.apply(this, arguments); } diff --git a/extensions/eclipse-che-theia-plugin-ext/tsfmt.json b/extensions/eclipse-che-theia-plugin-ext/tsfmt.json new file mode 100644 index 000000000..ad905f319 --- /dev/null +++ b/extensions/eclipse-che-theia-plugin-ext/tsfmt.json @@ -0,0 +1,18 @@ +{ + "baseIndentSize": 0, + "newLineCharacter": "\n", + "indentSize": 4, + "tabSize": 4, + "indentStyle": 4, + "convertTabsToSpaces": true, + "insertSpaceAfterCommaDelimiter": true, + "insertSpaceAfterSemicolonInForStatements": true, + "insertSpaceBeforeAndAfterBinaryOperators": true, + "insertSpaceAfterKeywordsInControlFlowStatements": true, + "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, + "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false, + "placeOpenBraceOnNewLineForFunctions": false, + "placeOpenBraceOnNewLineForControlBlocks": false +} diff --git a/extensions/eclipse-che-theia-plugin-ext/yarn.lock b/extensions/eclipse-che-theia-plugin-ext/yarn.lock index 706add852..fa7181452 100644 --- a/extensions/eclipse-che-theia-plugin-ext/yarn.lock +++ b/extensions/eclipse-che-theia-plugin-ext/yarn.lock @@ -561,7 +561,7 @@ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== -"@types/node@*": +"@types/node@*", "@types/node@^10.11.7": version "10.12.18" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.18.tgz#1d3ca764718915584fcd9f6344621b7672665c67" integrity sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ== @@ -632,7 +632,7 @@ resolved "https://registry.yarnpkg.com/@types/route-parser/-/route-parser-0.1.1.tgz#24b69588c68249f695122c230e547d3d6c8be095" integrity sha512-VF2jxpkSGehlHBcfnVbVuvAp9/EdGr9Gi0C9qOZk4IKMGuYwFkF6AmsRNhN4V1WeLX+FpaXXa7PwYjQNQeVJiA== -"@types/semver@^5.4.0": +"@types/semver@^5.4.0", "@types/semver@^5.5.0": version "5.5.0" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-5.5.0.tgz#146c2a29ee7d3bae4bf2fcb274636e264c813c45" integrity sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ== @@ -1524,6 +1524,11 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" +commander@^2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" + integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== + commander@~2.17.1: version "2.17.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" @@ -1536,6 +1541,11 @@ commander@~2.8.1: dependencies: graceful-readlink ">= 1.0.0" +commandpost@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/commandpost/-/commandpost-1.4.0.tgz#89218012089dfc9b67a337ba162f15c88e0f1048" + integrity sha512-aE2Y4MTFJ870NuB/+2z1cXBhSBBzRydVVjzhFC4gtenEhpnj15yu0qptWGJsO9YGrcPZ3ezX8AWb1VA391MKpQ== + commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -1989,6 +1999,18 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" +editorconfig@^0.15.0: + version "0.15.2" + resolved "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.15.2.tgz#047be983abb9ab3c2eefe5199cb2b7c5689f0702" + integrity sha512-GWjSI19PVJAM9IZRGOS+YKI8LN+/sjkSjNyvxL5ucqP9/IqtYNXBaQ/6c/hkPNYQHyOHra2KoXZI/JVpuqwmcQ== + dependencies: + "@types/node" "^10.11.7" + "@types/semver" "^5.5.0" + commander "^2.19.0" + lru-cache "^4.1.3" + semver "^5.6.0" + sigmund "^1.0.1" + ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -3423,7 +3445,7 @@ loud-rejection@^1.0.0: currently-unhandled "^0.4.1" signal-exit "^3.0.0" -lru-cache@^4.0.0, lru-cache@^4.0.1, lru-cache@^4.1.1: +lru-cache@^4.0.0, lru-cache@^4.0.1, lru-cache@^4.1.1, lru-cache@^4.1.3: version "4.1.5" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== @@ -4858,7 +4880,7 @@ seek-bzip@^1.0.5: dependencies: commander "~2.8.1" -"semver@2 || 3 || 4 || 5", semver@^5.0.1, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0: +"semver@2 || 3 || 4 || 5", semver@^5.0.1, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== @@ -4968,6 +4990,11 @@ shell-path@^2.0.0: dependencies: shell-env "^0.3.0" +sigmund@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" + integrity sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA= + signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -5556,6 +5583,14 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= +typescript-formatter@7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/typescript-formatter/-/typescript-formatter-7.2.2.tgz#a147181839b7bb09c2377b072f20f6336547c00a" + integrity sha512-V7vfI9XArVhriOTYHPzMU2WUnm5IMdu9X/CPxs8mIMGxmTBFpDABlbkBka64PZJ9/xgQeRpK8KzzAG4MPzxBDQ== + dependencies: + commandpost "^1.0.0" + editorconfig "^0.15.0" + typescript@^2.9.2: version "2.9.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c" diff --git a/extensions/eclipse-che-theia-plugin/package.json b/extensions/eclipse-che-theia-plugin/package.json index 5fa44c124..96af08971 100644 --- a/extensions/eclipse-che-theia-plugin/package.json +++ b/extensions/eclipse-che-theia-plugin/package.json @@ -1,23 +1,28 @@ { - "name": "@eclipse-che/plugin", - "version": "0.0.1", - "description": "Eclipse Che specific Theia plugin API", - "publishConfig": { - "access": "public" - }, - "license": "EPL-2.0", - "types": "./src/che.d.ts", - "files": [ - "src" - ], - "dependencies": { - "@eclipse-che/api": "^6.16.1" - }, - "scripts": { - "prepare": "", - "clean": "", - "build": "", - "watch": "", - "publish:next": "yarn publish --registry=https://registry.npmjs.org/ --no-git-tag-version --new-version 0.0.1-\"$(date +%s)\"" - } + "name": "@eclipse-che/plugin", + "version": "0.0.1", + "description": "Eclipse Che specific Theia plugin API", + "publishConfig": { + "access": "public" + }, + "license": "EPL-2.0", + "types": "./src/che.d.ts", + "files": [ + "src" + ], + "dependencies": { + "@eclipse-che/api": "^6.16.1" + }, + "scripts": { + "prepare": "", + "format-code": "tsfmt -r", + "clean": "", + "build": "yarn run format-code", + "watch": "", + "publish:next": "yarn publish --registry=https://registry.npmjs.org/ --no-git-tag-version --new-version 0.0.1-\"$(date +%s)\"" + }, + "devDependencies": { + "typescript": "^2.9.2", + "typescript-formatter": "7.2.2" + } } diff --git a/extensions/eclipse-che-theia-plugin/tsfmt.json b/extensions/eclipse-che-theia-plugin/tsfmt.json new file mode 100644 index 000000000..ad905f319 --- /dev/null +++ b/extensions/eclipse-che-theia-plugin/tsfmt.json @@ -0,0 +1,18 @@ +{ + "baseIndentSize": 0, + "newLineCharacter": "\n", + "indentSize": 4, + "tabSize": 4, + "indentStyle": 4, + "convertTabsToSpaces": true, + "insertSpaceAfterCommaDelimiter": true, + "insertSpaceAfterSemicolonInForStatements": true, + "insertSpaceBeforeAndAfterBinaryOperators": true, + "insertSpaceAfterKeywordsInControlFlowStatements": true, + "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, + "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false, + "placeOpenBraceOnNewLineForFunctions": false, + "placeOpenBraceOnNewLineForControlBlocks": false +} diff --git a/extensions/eclipse-che-theia-plugin/yarn.lock b/extensions/eclipse-che-theia-plugin/yarn.lock index b0cabec6b..f1da2cdb8 100644 --- a/extensions/eclipse-che-theia-plugin/yarn.lock +++ b/extensions/eclipse-che-theia-plugin/yarn.lock @@ -5,3 +5,76 @@ "@eclipse-che/api@^6.16.1": version "6.16.1" resolved "https://registry.yarnpkg.com/@eclipse-che/api/-/api-6.16.1.tgz#5b5e70285cf27d525df3752c938388e36f7925d6" + +"@types/node@^10.11.7": + version "10.12.18" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.18.tgz#1d3ca764718915584fcd9f6344621b7672665c67" + integrity sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ== + +"@types/semver@^5.5.0": + version "5.5.0" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-5.5.0.tgz#146c2a29ee7d3bae4bf2fcb274636e264c813c45" + integrity sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ== + +commander@^2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" + integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== + +commandpost@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/commandpost/-/commandpost-1.4.0.tgz#89218012089dfc9b67a337ba162f15c88e0f1048" + integrity sha512-aE2Y4MTFJ870NuB/+2z1cXBhSBBzRydVVjzhFC4gtenEhpnj15yu0qptWGJsO9YGrcPZ3ezX8AWb1VA391MKpQ== + +editorconfig@^0.15.0: + version "0.15.2" + resolved "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.15.2.tgz#047be983abb9ab3c2eefe5199cb2b7c5689f0702" + integrity sha512-GWjSI19PVJAM9IZRGOS+YKI8LN+/sjkSjNyvxL5ucqP9/IqtYNXBaQ/6c/hkPNYQHyOHra2KoXZI/JVpuqwmcQ== + dependencies: + "@types/node" "^10.11.7" + "@types/semver" "^5.5.0" + commander "^2.19.0" + lru-cache "^4.1.3" + semver "^5.6.0" + sigmund "^1.0.1" + +lru-cache@^4.1.3: + version "4.1.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= + +semver@^5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" + integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== + +sigmund@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" + integrity sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA= + +typescript-formatter@7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/typescript-formatter/-/typescript-formatter-7.2.2.tgz#a147181839b7bb09c2377b072f20f6336547c00a" + integrity sha512-V7vfI9XArVhriOTYHPzMU2WUnm5IMdu9X/CPxs8mIMGxmTBFpDABlbkBka64PZJ9/xgQeRpK8KzzAG4MPzxBDQ== + dependencies: + commandpost "^1.0.0" + editorconfig "^0.15.0" + +typescript@^2.9.2: + version "2.9.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c" + integrity sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w== + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= diff --git a/plugins/factory-plugin/package.json b/plugins/factory-plugin/package.json index d62c80bc3..1dd6afdee 100644 --- a/plugins/factory-plugin/package.json +++ b/plugins/factory-plugin/package.json @@ -1,63 +1,60 @@ { - "name": "@eclipse-che/theia-factory-plugin", - "keywords": [ - "theia-plugin" - ], - "version": "0.0.1", - "license": "EPL-2.0", - "files": [ - "src" - ], - "devDependencies": { - "@theia/plugin": "^0.4.0-next.ac580dd6", - "@theia/plugin-packager": "^0.0.1-1539891078", - "@eclipse-che/api": "^6.16.1", - "@eclipse-che/plugin": "^0.0.1-1546977605", - "@types/jest": "22.2.3", - "jest": "22.4.3", - "ts-jest": "22.4.3", - "rimraf": "2.6.2", - "tslint": "5.10.0", - "typescript": "2.9.2", - "typescript-formatter": "7.2.2" - }, - "scripts": { - "prepare": "yarn run clean && yarn run build && yarn tslint-fix && yarn run test", - "clean": "rimraf lib", - "format-code": "tsfmt -r", - "watch": "tsc -watch", - "compile": "tsc", - "build": "yarn run format-code && yarn run compile && theia:plugin pack", - "tslint-fix": "tslint --fix --project .", - "test": "jest", - "test-watch": "jest --watchAll" - }, - "engines": { - "theiaPlugin": "next" - }, - "theiaPlugin": { - "backend": "lib/factory-plugin.js" - }, - "jest": { - "collectCoverage": true, - "collectCoverageFrom": [ - "src/**/*.ts" + "name": "@eclipse-che/theia-factory-plugin", + "keywords": [ + "theia-plugin" ], - "coverageDirectory": "./coverage", - "transform": { - "^.+\\.tsx?$": "/node_modules/ts-jest/preprocessor.js" - }, - "modulePathIgnorePatterns": [ - "/lib" - ], - "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", - "moduleFileExtensions": [ - "ts", - "tsx", - "js", - "jsx", - "json" + "version": "0.0.1", + "license": "EPL-2.0", + "files": [ + "src" ], - "testURL": "http://localhost/" - } + "devDependencies": { + "@theia/plugin": "^0.4.0-next.ac580dd6", + "@theia/plugin-packager": "^0.0.1-1539891078", + "@eclipse-che/api": "^6.16.1", + "@eclipse-che/plugin": "^0.0.1-1546977605", + "@types/jest": "22.2.3", + "jest": "22.4.3", + "rimraf": "2.6.2", + "ts-jest": "22.4.3", + "tslint": "5.10.0", + "typescript": "2.9.2", + "typescript-formatter": "7.2.2" + }, + "scripts": { + "prepare": "yarn run clean && yarn run build", + "clean": "rimraf lib", + "format-code": "tsfmt -r", + "watch": "tsc -watch", + "compile": "tsc", + "build": "yarn run format-code && yarn run compile && theia:plugin pack" + }, + "engines": { + "theiaPlugin": "next" + }, + "theiaPlugin": { + "backend": "lib/factory-plugin.js" + }, + "jest": { + "collectCoverage": true, + "collectCoverageFrom": [ + "src/**/*.ts" + ], + "coverageDirectory": "./coverage", + "transform": { + "^.+\\.tsx?$": "/node_modules/ts-jest/preprocessor.js" + }, + "modulePathIgnorePatterns": [ + "/lib" + ], + "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", + "moduleFileExtensions": [ + "ts", + "tsx", + "js", + "jsx", + "json" + ], + "testURL": "http://localhost/" + } } diff --git a/plugins/factory-plugin/src/factory-initializer.ts b/plugins/factory-plugin/src/factory-initializer.ts index 4921424e6..207f271e3 100644 --- a/plugins/factory-plugin/src/factory-initializer.ts +++ b/plugins/factory-plugin/src/factory-initializer.ts @@ -1,114 +1,114 @@ -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ -import * as theia from '@theia/plugin'; -import * as che from '@eclipse-che/plugin'; -import { che as cheApi } from '@eclipse-che/api'; -import { TheiaCloneCommand, TheiaCommand } from './theia-commands'; - -export enum ActionId { - OPEN_FILE = 'openFile', - RUN_COMMAND = 'runCommand' -} - -/** - * Provides basic Eclipse Che factory features to be executed at startup of the Theia browser IDE: - * - checking/retrieving factory-id from URL - * - request che factory api to get the factory definition - * - clone the projects defined in the factory definition - * - checkout branch if needed - */ -export class FactoryInitializer { - - constructor(protected projectsRoot: string) { - } - - async run() { - const factoryId = theia.env.getQueryParameter('factory-id'); - - if (!factoryId || typeof factoryId !== 'string') { - return; - } - - let factory: cheApi.factory.Factory; - try { - factory = await che.factory.getById(factoryId); - } catch (e) { - theia.window.showErrorMessage(`Unable to get factory. ${e.message}`); - return; - } - - // Clone Factory projects - const cloneCommands = await this.getCloneCommands(factory); - await this.executeCloneCommands(cloneCommands); - - // Perform actions after cloning Factory projects - const onProjectsImportedCommands = this.getOnProjectsImportedCommands(factory); - await this.executeOnProjectsImportedCommands(onProjectsImportedCommands); - - // TODO const onAppLoadedCommandList = factory.getOnAppLoadedActions().map(action => new TheiaCommand(action.id, action.parameters)); - // TODO const onAppClosedCommandList = factory.getOnAppLoadedActions().map(action => new TheiaCommand(action.id, action.parameters)); - // TODO register trigger for on appClosed ... onStop method ? - // - on web app closed - // TODO await this.executeOnAppLoadedCommands(onAppLoadedCommandList) - } - - /** - * Returns a list of commands to clone Factory projects - */ - private async getCloneCommands(factory: cheApi.factory.Factory) { - const instance = this; - - if (!factory.workspace || !factory.workspace.projects) { - return []; - } - - return factory.workspace.projects.map( - project => new TheiaCloneCommand(project, instance.projectsRoot) - ); - } - - /** - * Returns a list of commands to be executed after cloning the projects - */ - private getOnProjectsImportedCommands(factory: cheApi.factory.Factory) { - if (!factory.ide || !factory.ide.onProjectsLoaded || !factory.ide.onProjectsLoaded.actions) { - return []; - } - - return factory.ide.onProjectsLoaded.actions.map( - action => new TheiaCommand(action.id!, action.properties) - ); - } - - private async executeCloneCommands(cloneCommands: TheiaCloneCommand[]) { - if (cloneCommands.length === 0) { - return; - } - - await Promise.all( - cloneCommands.map(command => command.execute()) - ); - - theia.window.showInformationMessage("Che Factory: Finished cloning projects."); - } - - private async executeOnProjectsImportedCommands(onProjectsImportedCommands: TheiaCommand[]) { - if (onProjectsImportedCommands.length === 0) { - return; - } - - await Promise.all( - onProjectsImportedCommands.map(command => command.execute()) - ); - - theia.window.showInformationMessage("Che Factory: Finished executing 'onProjectImported' command actions."); - } - -} +/********************************************************************* + * Copyright (c) 2018 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ +import * as theia from '@theia/plugin'; +import * as che from '@eclipse-che/plugin'; +import { che as cheApi } from '@eclipse-che/api'; +import { TheiaCloneCommand, TheiaCommand } from './theia-commands'; + +export enum ActionId { + OPEN_FILE = 'openFile', + RUN_COMMAND = 'runCommand' +} + +/** + * Provides basic Eclipse Che factory features to be executed at startup of the Theia browser IDE: + * - checking/retrieving factory-id from URL + * - request che factory api to get the factory definition + * - clone the projects defined in the factory definition + * - checkout branch if needed + */ +export class FactoryInitializer { + + constructor(protected projectsRoot: string) { + } + + async run() { + const factoryId = theia.env.getQueryParameter('factory-id'); + + if (!factoryId || typeof factoryId !== 'string') { + return; + } + + let factory: cheApi.factory.Factory; + try { + factory = await che.factory.getById(factoryId); + } catch (e) { + theia.window.showErrorMessage(`Unable to get factory. ${e.message}`); + return; + } + + // Clone Factory projects + const cloneCommands = await this.getCloneCommands(factory); + await this.executeCloneCommands(cloneCommands); + + // Perform actions after cloning Factory projects + const onProjectsImportedCommands = this.getOnProjectsImportedCommands(factory); + await this.executeOnProjectsImportedCommands(onProjectsImportedCommands); + + // TODO const onAppLoadedCommandList = factory.getOnAppLoadedActions().map(action => new TheiaCommand(action.id, action.parameters)); + // TODO const onAppClosedCommandList = factory.getOnAppLoadedActions().map(action => new TheiaCommand(action.id, action.parameters)); + // TODO register trigger for on appClosed ... onStop method ? + // - on web app closed + // TODO await this.executeOnAppLoadedCommands(onAppLoadedCommandList) + } + + /** + * Returns a list of commands to clone Factory projects + */ + private async getCloneCommands(factory: cheApi.factory.Factory) { + const instance = this; + + if (!factory.workspace || !factory.workspace.projects) { + return []; + } + + return factory.workspace.projects.map( + project => new TheiaCloneCommand(project, instance.projectsRoot) + ); + } + + /** + * Returns a list of commands to be executed after cloning the projects + */ + private getOnProjectsImportedCommands(factory: cheApi.factory.Factory) { + if (!factory.ide || !factory.ide.onProjectsLoaded || !factory.ide.onProjectsLoaded.actions) { + return []; + } + + return factory.ide.onProjectsLoaded.actions.map( + action => new TheiaCommand(action.id!, action.properties) + ); + } + + private async executeCloneCommands(cloneCommands: TheiaCloneCommand[]) { + if (cloneCommands.length === 0) { + return; + } + + await Promise.all( + cloneCommands.map(command => command.execute()) + ); + + theia.window.showInformationMessage("Che Factory: Finished cloning projects."); + } + + private async executeOnProjectsImportedCommands(onProjectsImportedCommands: TheiaCommand[]) { + if (onProjectsImportedCommands.length === 0) { + return; + } + + await Promise.all( + onProjectsImportedCommands.map(command => command.execute()) + ); + + theia.window.showInformationMessage("Che Factory: Finished executing 'onProjectImported' command actions."); + } + +} diff --git a/plugins/factory-plugin/src/factory-plugin.ts b/plugins/factory-plugin/src/factory-plugin.ts index fb8360141..5b45292db 100644 --- a/plugins/factory-plugin/src/factory-plugin.ts +++ b/plugins/factory-plugin/src/factory-plugin.ts @@ -1,27 +1,27 @@ -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ - -import * as theia from '@theia/plugin'; -import { FactoryInitializer } from "./factory-initializer"; -import { WorkspaceProjectsManager } from "./workspace-projects-manager"; - -export async function start() { - let projectsRoot = '/projects'; - const projectsRootEnvVar = await theia.env.getEnvVariable('CHE_PROJECTS_ROOT'); - if (projectsRootEnvVar) { - projectsRoot = projectsRootEnvVar; - } - - await new FactoryInitializer(projectsRoot).run(); - await new WorkspaceProjectsManager(projectsRoot).run(); -} - -export function stop() { -} +/********************************************************************* + * Copyright (c) 2018 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +import * as theia from '@theia/plugin'; +import { FactoryInitializer } from "./factory-initializer"; +import { WorkspaceProjectsManager } from "./workspace-projects-manager"; + +export async function start() { + let projectsRoot = '/projects'; + const projectsRootEnvVar = await theia.env.getEnvVariable('CHE_PROJECTS_ROOT'); + if (projectsRootEnvVar) { + projectsRoot = projectsRootEnvVar; + } + + await new FactoryInitializer(projectsRoot).run(); + await new WorkspaceProjectsManager(projectsRoot).run(); +} + +export function stop() { +} diff --git a/plugins/factory-plugin/src/openfile.ts b/plugins/factory-plugin/src/openfile.ts index 9bd9b8881..5304f107d 100644 --- a/plugins/factory-plugin/src/openfile.ts +++ b/plugins/factory-plugin/src/openfile.ts @@ -1,32 +1,32 @@ -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ - -export default function convertToFileURI(file: string, rootFolder?: string): string { - if (file.startsWith('file://')) { - return file; - } - if (!rootFolder) { - rootFolder = '/projects'; - } - if (rootFolder.endsWith('/')) { - rootFolder = rootFolder.substring(0, rootFolder.length - 1); - } - if (!file.startsWith('/')) { - file = `/${file}`; - } - if (rootFolder.startsWith('file://')) { - return rootFolder + file; - } - if (!rootFolder.startsWith('/')) { - rootFolder = `/${rootFolder}`; - } - return `file://${rootFolder}${file}`; - -} +/********************************************************************* + * Copyright (c) 2018 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +export default function convertToFileURI(file: string, rootFolder?: string): string { + if (file.startsWith('file://')) { + return file; + } + if (!rootFolder) { + rootFolder = '/projects'; + } + if (rootFolder.endsWith('/')) { + rootFolder = rootFolder.substring(0, rootFolder.length - 1); + } + if (!file.startsWith('/')) { + file = `/${file}`; + } + if (rootFolder.startsWith('file://')) { + return rootFolder + file; + } + if (!rootFolder.startsWith('/')) { + rootFolder = `/${rootFolder}`; + } + return `file://${rootFolder}${file}`; + +} diff --git a/plugins/factory-plugin/src/theia-commands.ts b/plugins/factory-plugin/src/theia-commands.ts index 1304cf8c3..aff06d5a7 100644 --- a/plugins/factory-plugin/src/theia-commands.ts +++ b/plugins/factory-plugin/src/theia-commands.ts @@ -1,95 +1,95 @@ -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ -import * as theia from '@theia/plugin'; -import { che as cheApi } from '@eclipse-che/api'; -import convertToFileURI from './openfile'; - -const CHE_TASK_TYPE = 'che'; - -/** - * Enumeration ID's of ide actions. - */ -export enum ActionId { - OPEN_FILE = 'openFile', - RUN_COMMAND = 'runCommand' -} - -export class TheiaCloneCommand { - - private locationURI: string | undefined; - private folder: string; - private checkoutBranch?: string | undefined; - - constructor(project: cheApi.workspace.ProjectConfig, projectsRoot: string) { - this.locationURI = project.source && project.source.location ? project.source.location : undefined; - this.folder = projectsRoot + project.path; - this.checkoutBranch = project.source && project.source.parameters && project.source.parameters['branch'] ? - project.source.parameters['branch'] : undefined; - } - - execute(): PromiseLike { - if (!this.locationURI) { - return new Promise(() => { }); - } - - return theia.commands.executeCommand('git.clone', this.locationURI, this.folder, this.checkoutBranch) - .then((repo) => { - theia.window.showInformationMessage(`Project ${this.locationURI} cloned! to ${repo}`); - }, e => { - theia.window.showErrorMessage(`Couldnt clone ${this.locationURI}: ${e.message}`); - console.log(`Couldnt clone ${this.locationURI}`, e); - }); - } - -} - -export class TheiaCommand { - - constructor( - protected readonly id: string, - protected readonly properties?: { - name?: string, - file?: string, - greetingTitle?: string, - greetingContentUrl?: string - } - ) { - } - - execute(): PromiseLike { - if (this.id === ActionId.OPEN_FILE) { - if (this.properties && this.properties.file) { - const fileLocation = convertToFileURI(this.properties.file); - return theia.commands.executeCommand('file-search.openFile', fileLocation) - .then(() => { - - }, e => { - theia.window.showErrorMessage(`Could not open file: ${e.message}`); - console.log(`Could not open file `, e); - }); - } - } - - if (this.id === ActionId.RUN_COMMAND) { - if (this.properties) { - return theia.commands.executeCommand('task:run', CHE_TASK_TYPE, this.properties.name) - .then(() => { - theia.window.showInformationMessage(`Executed che command succesfully`); - }, e => { - theia.window.showErrorMessage(`Could not execute Che command: ${e.message}`); - console.log(`Could not execute Che command`, e); - }); - } - } - - return new Promise(() => { console.error('action nor openfile nor run command'); }); - } - -} +/********************************************************************* + * Copyright (c) 2018 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ +import * as theia from '@theia/plugin'; +import { che as cheApi } from '@eclipse-che/api'; +import convertToFileURI from './openfile'; + +const CHE_TASK_TYPE = 'che'; + +/** + * Enumeration ID's of ide actions. + */ +export enum ActionId { + OPEN_FILE = 'openFile', + RUN_COMMAND = 'runCommand' +} + +export class TheiaCloneCommand { + + private locationURI: string | undefined; + private folder: string; + private checkoutBranch?: string | undefined; + + constructor(project: cheApi.workspace.ProjectConfig, projectsRoot: string) { + this.locationURI = project.source && project.source.location ? project.source.location : undefined; + this.folder = projectsRoot + project.path; + this.checkoutBranch = project.source && project.source.parameters && project.source.parameters['branch'] ? + project.source.parameters['branch'] : undefined; + } + + execute(): PromiseLike { + if (!this.locationURI) { + return new Promise(() => { }); + } + + return theia.commands.executeCommand('git.clone', this.locationURI, this.folder, this.checkoutBranch) + .then((repo) => { + theia.window.showInformationMessage(`Project ${this.locationURI} cloned! to ${repo}`); + }, e => { + theia.window.showErrorMessage(`Couldnt clone ${this.locationURI}: ${e.message}`); + console.log(`Couldnt clone ${this.locationURI}`, e); + }); + } + +} + +export class TheiaCommand { + + constructor( + protected readonly id: string, + protected readonly properties?: { + name?: string, + file?: string, + greetingTitle?: string, + greetingContentUrl?: string + } + ) { + } + + execute(): PromiseLike { + if (this.id === ActionId.OPEN_FILE) { + if (this.properties && this.properties.file) { + const fileLocation = convertToFileURI(this.properties.file); + return theia.commands.executeCommand('file-search.openFile', fileLocation) + .then(() => { + + }, e => { + theia.window.showErrorMessage(`Could not open file: ${e.message}`); + console.log(`Could not open file `, e); + }); + } + } + + if (this.id === ActionId.RUN_COMMAND) { + if (this.properties) { + return theia.commands.executeCommand('task:run', CHE_TASK_TYPE, this.properties.name) + .then(() => { + theia.window.showInformationMessage(`Executed che command succesfully`); + }, e => { + theia.window.showErrorMessage(`Could not execute Che command: ${e.message}`); + console.log(`Could not execute Che command`, e); + }); + } + } + + return new Promise(() => { console.error('action nor openfile nor run command'); }); + } + +} diff --git a/plugins/factory-plugin/src/workspace-projects-manager.ts b/plugins/factory-plugin/src/workspace-projects-manager.ts index 872412967..1e507c0e6 100644 --- a/plugins/factory-plugin/src/workspace-projects-manager.ts +++ b/plugins/factory-plugin/src/workspace-projects-manager.ts @@ -1,60 +1,60 @@ -/********************************************************************* - * Copyright (c) 2018 Red Hat, Inc. - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - **********************************************************************/ - -import { TheiaCloneCommand } from './theia-commands'; -import * as theia from '@theia/plugin'; -import * as che from '@eclipse-che/plugin'; -import { che as cheApi } from '@eclipse-che/api'; - -const fs = require('fs'); - -/** - * Make synchronization between projects defined in Che workspace and theia projects. - */ -export class WorkspaceProjectsManager { - - constructor(protected projectsRoot: string) { - } - - async run() { - const workspace = await che.workspace.getCurrentWorkspace(); - - const cloneCommandList = await this.selectProjectToCloneCommands(workspace); - if (cloneCommandList.length === 0) { - return; - } - - await this.executeCloneCommands(cloneCommandList); - } - - async selectProjectToCloneCommands(workspace: cheApi.workspace.Workspace): Promise { - const instance = this; - - const projects = workspace.config!.projects; - if (!projects) { - return []; - } - - return projects - .filter(project => !fs.existsSync(instance.projectsRoot + project.path)) - .map(project => new TheiaCloneCommand(project, instance.projectsRoot)); - } - - private async executeCloneCommands(cloneCommandList: TheiaCloneCommand[]) { - theia.window.showInformationMessage("Che Workspace: Starting cloning projects."); - - await Promise.all( - cloneCommandList.map(cloneCommand => cloneCommand.execute()) - ); - - theia.window.showInformationMessage("Che Workspace: Finished cloning projects."); - } - -} +/********************************************************************* + * Copyright (c) 2018 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ + +import { TheiaCloneCommand } from './theia-commands'; +import * as theia from '@theia/plugin'; +import * as che from '@eclipse-che/plugin'; +import { che as cheApi } from '@eclipse-che/api'; + +const fs = require('fs'); + +/** + * Make synchronization between projects defined in Che workspace and theia projects. + */ +export class WorkspaceProjectsManager { + + constructor(protected projectsRoot: string) { + } + + async run() { + const workspace = await che.workspace.getCurrentWorkspace(); + + const cloneCommandList = await this.selectProjectToCloneCommands(workspace); + if (cloneCommandList.length === 0) { + return; + } + + await this.executeCloneCommands(cloneCommandList); + } + + async selectProjectToCloneCommands(workspace: cheApi.workspace.Workspace): Promise { + const instance = this; + + const projects = workspace.config!.projects; + if (!projects) { + return []; + } + + return projects + .filter(project => !fs.existsSync(instance.projectsRoot + project.path)) + .map(project => new TheiaCloneCommand(project, instance.projectsRoot)); + } + + private async executeCloneCommands(cloneCommandList: TheiaCloneCommand[]) { + theia.window.showInformationMessage("Che Workspace: Starting cloning projects."); + + await Promise.all( + cloneCommandList.map(cloneCommand => cloneCommand.execute()) + ); + + theia.window.showInformationMessage("Che Workspace: Finished cloning projects."); + } + +} diff --git a/plugins/factory-plugin/tsconfig.json b/plugins/factory-plugin/tsconfig.json index 652864e0b..919b7e5c7 100644 --- a/plugins/factory-plugin/tsconfig.json +++ b/plugins/factory-plugin/tsconfig.json @@ -14,8 +14,7 @@ ], "sourceMap": true, "rootDir": "src", - "outDir": "lib", - "skipLibCheck": true + "outDir": "lib" }, "include": [ "src" diff --git a/plugins/factory-plugin/tsfmt.json b/plugins/factory-plugin/tsfmt.json new file mode 100644 index 000000000..ad905f319 --- /dev/null +++ b/plugins/factory-plugin/tsfmt.json @@ -0,0 +1,18 @@ +{ + "baseIndentSize": 0, + "newLineCharacter": "\n", + "indentSize": 4, + "tabSize": 4, + "indentStyle": 4, + "convertTabsToSpaces": true, + "insertSpaceAfterCommaDelimiter": true, + "insertSpaceAfterSemicolonInForStatements": true, + "insertSpaceBeforeAndAfterBinaryOperators": true, + "insertSpaceAfterKeywordsInControlFlowStatements": true, + "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, + "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false, + "placeOpenBraceOnNewLineForFunctions": false, + "placeOpenBraceOnNewLineForControlBlocks": false +}