Skip to content

Commit

Permalink
refactor: Fix ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
maxreichmann committed Apr 10, 2024
1 parent aecf1d3 commit d3adbc1
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 27 deletions.
4 changes: 2 additions & 2 deletions src/utils/deprecatedLibs.ts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -19,4 +19,4 @@ const deprecatedLibs: string[] = [
"sap.zen.dsh",
];

export default deprecatedLibs;
export default deprecatedLibs;
6 changes: 3 additions & 3 deletions test/lib/linter/UI5YamlLinter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) */
Expand All @@ -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);
Expand Down
45 changes: 23 additions & 22 deletions test/lib/utils/deprecatedLibs.ts
Original file line number Diff line number Diff line change
@@ -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.");
});

0 comments on commit d3adbc1

Please sign in to comment.