From d3adbc1641f65b3fe1fa6f00f9e433907ab7e596 Mon Sep 17 00:00:00 2001 From: Max Reichmann Date: Wed, 10 Apr 2024 14:38:12 +0200 Subject: [PATCH] refactor: Fix ESLint --- src/utils/deprecatedLibs.ts | 4 +-- test/lib/linter/UI5YamlLinter.ts | 6 ++--- test/lib/utils/deprecatedLibs.ts | 45 ++++++++++++++++---------------- 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/src/utils/deprecatedLibs.ts b/src/utils/deprecatedLibs.ts index 1594cc557..3df8c10d8 100644 --- a/src/utils/deprecatedLibs.ts +++ b/src/utils/deprecatedLibs.ts @@ -1,5 +1,5 @@ const deprecatedLibs: string[] = [ - "sap.ca.scfld.md", + "sap.ca.scfld.md", "sap.ca.ui", "sap.fe.common", // Internal, removed in 1.110 "sap.fe.plugins", // Internal, removed in 1.102 @@ -19,4 +19,4 @@ const deprecatedLibs: string[] = [ "sap.zen.dsh", ]; -export default deprecatedLibs; \ No newline at end of file +export default deprecatedLibs; diff --git a/test/lib/linter/UI5YamlLinter.ts b/test/lib/linter/UI5YamlLinter.ts index 97e9bbab9..27cdcd698 100644 --- a/test/lib/linter/UI5YamlLinter.ts +++ b/test/lib/linter/UI5YamlLinter.ts @@ -2,7 +2,7 @@ import test from "ava"; import UI5YamlLinter from "../../../src/linter/yaml/UI5YamlLinter.js"; test("Test UI5YamlLinter report (parsing and analyzing)", async (t) => { - /* Mock resource content of ui5.yaml file, + /* Mock resource content of ui5.yaml file, (formatted as used in src/detectors/typeChecker/index.ts - #analyzeFiles()), (contains relevant 'framework' property and 'libraries' sub-property), (contains only deprecated libraries) */ @@ -18,8 +18,8 @@ framework: - name: sap.ca.scfld.md - name: sap.ca.ui - name: sap.fe.common`; - - const path = "/ui5.js"; // '.js' due to renaming in src/detectors/typeChecker/index.ts - #analyzeFiles() + + const path = "/ui5.js"; // '.js' due to renaming in src/detectors/typeChecker/index.ts - #analyzeFiles() // Create UI5YamlLinter instance with resource content const linter = new UI5YamlLinter(resourceContent, path); diff --git a/test/lib/utils/deprecatedLibs.ts b/test/lib/utils/deprecatedLibs.ts index f6df615b8..036833577 100644 --- a/test/lib/utils/deprecatedLibs.ts +++ b/test/lib/utils/deprecatedLibs.ts @@ -1,26 +1,27 @@ import test from "ava"; import deprecatedLibs from "../../../src/utils/deprecatedLibs.js"; -test("Test Deprecated Libs constant", t => { - const expectedDeprecatedLibs: string[] = [ - "sap.ca.scfld.md", - "sap.ca.ui", - "sap.fe.common", // Internal, removed in 1.110 - "sap.fe.plugins", // Internal, removed in 1.102 - "sap.fe.semantics", // Internal, removed in 1.104 - "sap.landvisz", // Removed in 1.120 - "sap.makit", - "sap.me", - "sap.sac.grid", // Removed in 1.114 - "sap.ui.commons", - "sap.ui.suite", - "sap.ui.ux3", - "sap.ui.vtm", - "sap.uiext.inbox", - "sap.webanalytics.core", - "sap.zen.commons", - "sap.zen.crosstab", - "sap.zen.dsh", - ]; - t.deepEqual(deprecatedLibs, expectedDeprecatedLibs, "Expected deprecated libraries list should match the actual list."); +test("Test Deprecated Libs constant", (t) => { + const expectedDeprecatedLibs: string[] = [ + "sap.ca.scfld.md", + "sap.ca.ui", + "sap.fe.common", // Internal, removed in 1.110 + "sap.fe.plugins", // Internal, removed in 1.102 + "sap.fe.semantics", // Internal, removed in 1.104 + "sap.landvisz", // Removed in 1.120 + "sap.makit", + "sap.me", + "sap.sac.grid", // Removed in 1.114 + "sap.ui.commons", + "sap.ui.suite", + "sap.ui.ux3", + "sap.ui.vtm", + "sap.uiext.inbox", + "sap.webanalytics.core", + "sap.zen.commons", + "sap.zen.crosstab", + "sap.zen.dsh", + ]; + t.deepEqual(deprecatedLibs, expectedDeprecatedLibs, + "Expected deprecated libraries list should match the actual list."); });