From 05404300c216e43abcf508099fe752eb4ccfc52e Mon Sep 17 00:00:00 2001 From: somebody1234 Date: Tue, 9 May 2023 03:09:13 +1000 Subject: [PATCH] Revert typescript CI Lint changes (#6602) * Revert "Fix lint CI (#6567)" This reverts commit 0a8f80959f65c9891ff8cffb68c5d9a7e6cd527c. * Revert "Run typecheck and eslint on `./run lint` (#6314)" This reverts commit 7885145b6e3caf42b343950ae23646dcd789bb27. --- .../lib/client/src/file-associations.ts | 5 ++--- app/ide-desktop/lib/content-config/src/index.ts | 2 +- app/ide-desktop/lib/types/modules.d.ts | 17 ----------------- build/cli/src/lib.rs | 6 ------ 4 files changed, 3 insertions(+), 27 deletions(-) diff --git a/app/ide-desktop/lib/client/src/file-associations.ts b/app/ide-desktop/lib/client/src/file-associations.ts index 4a6e1c67c330..02dc0bfbfd3c 100644 --- a/app/ide-desktop/lib/client/src/file-associations.ts +++ b/app/ide-desktop/lib/client/src/file-associations.ts @@ -104,7 +104,7 @@ export function isFileOpenable(path: string): boolean { * we manually start a new instance of the application and pass the file path to it (using the * Windows-style command). */ -export function onFileOpened(event: Event, path: string): string | null { +export function onFileOpened(event: Event, path: string): string | void { logger.log(`Received 'open-file' event for path '${path}'.`) if (isFileOpenable(path)) { logger.log(`The file '${path}' is openable.`) @@ -114,6 +114,7 @@ export function onFileOpened(event: Event, path: string): string | null { if (!electron.app.isReady() && CLIENT_ARGUMENTS.length === 0) { event.preventDefault() logger.log(`Opening file '${path}'.`) + // eslint-disable-next-line no-restricted-syntax return handleOpenFile(path) } else { // We need to start another copy of the application, as the first one is already running. @@ -127,11 +128,9 @@ export function onFileOpened(event: Event, path: string): string | null { }) // Prevent parent (this) process from waiting for the child to exit. child.unref() - return null } } else { logger.log(`The file '${path}' is not openable, ignoring the 'open-file' event.`) - return null } } diff --git a/app/ide-desktop/lib/content-config/src/index.ts b/app/ide-desktop/lib/content-config/src/index.ts index 1a68e317199a..c2aed90d433f 100644 --- a/app/ide-desktop/lib/content-config/src/index.ts +++ b/app/ide-desktop/lib/content-config/src/index.ts @@ -2,7 +2,7 @@ import * as semver from 'semver' -import * as linkedDist from '../../../../../target/ensogl-pack/linked-dist' +import * as linkedDist from '../../../../../target/ensogl-pack/linked-dist/index' import BUILD_INFO from '../../../build.json' assert { type: 'json' } // Aliases with the same name as the original. diff --git a/app/ide-desktop/lib/types/modules.d.ts b/app/ide-desktop/lib/types/modules.d.ts index 58762fe78f19..3c68a6e47708 100644 --- a/app/ide-desktop/lib/types/modules.d.ts +++ b/app/ide-desktop/lib/types/modules.d.ts @@ -2,23 +2,6 @@ * * This file MUST NOT `export {}` for the modules to be visible to other files. */ -declare module '*/build.json' { - interface BuildInfo { - commit: string - version: string - engineVersion: string - name: string - } - - const BUILD_INFO: BuildInfo - export default BUILD_INFO -} - -declare module '*/ensogl-pack/linked-dist' { - // eslint-disable-next-line no-restricted-syntax - export * from '../../../../lib/rust/ensogl/pack/js/src/runner/index' -} - declare module '*/gui/config.yaml' { interface Config { windowAppScopeName: string diff --git a/build/cli/src/lib.rs b/build/cli/src/lib.rs index c6fc4f497cc7..7ab115122e0f 100644 --- a/build/cli/src/lib.rs +++ b/build/cli/src/lib.rs @@ -86,8 +86,6 @@ use ide_ci::programs::git; use ide_ci::programs::git::clean; use ide_ci::programs::rustc; use ide_ci::programs::Cargo; -use ide_ci::programs::Npm; -use ide_ci::programs::Npx; use std::time::Duration; use tempfile::tempdir; use tokio::process::Child; @@ -837,10 +835,6 @@ pub async fn main_internal(config: Option) -> Result .await?; prettier::check(&ctx.repo_root).await?; - let js_modules_root = ctx.repo_root.join("app/ide-desktop"); - Npm.cmd()?.current_dir(&js_modules_root).args(["install"]).run_ok().await?; - Npm.cmd()?.current_dir(&js_modules_root).args(["run", "typecheck"]).run_ok().await?; - Npx.cmd()?.current_dir(&js_modules_root).args(["eslint", "."]).run_ok().await?; } Target::Fmt => { let prettier = prettier::write(&ctx.repo_root);