style: fix linting issues met ESLint

This commit is contained in:
Lint Action 2025-03-11 03:09:08 +00:00
parent a30c4d0d32
commit aa1a85e64e
24 changed files with 76 additions and 90 deletions

View file

@ -2,8 +2,8 @@ import {LearningObjectExample} from "./learning-object-example";
import {LearningObject} from "../../../src/entities/content/learning-object.entity";
export function createExampleLearningObjectWithAttachments(example: LearningObjectExample): LearningObject {
let learningObject = example.createLearningObject();
for (let creationFn of Object.values(example.createAttachment)) {
const learningObject = example.createLearningObject();
for (const creationFn of Object.values(example.createAttachment)) {
learningObject.attachments.push(creationFn(learningObject));
}
return learningObject;

View file

@ -10,7 +10,7 @@ const ASSETS_PREFIX = "learning-objects/pn-werkingnotebooks/";
const example: LearningObjectExample = {
createLearningObject: ()=> {
let learningObject = new LearningObject();
const learningObject = new LearningObject();
learningObject.hruid = `${getEnvVar(EnvVars.UserContentPrefix)}pn_werkingnotebooks`;
learningObject.version = 3;
learningObject.language = Language.Dutch;
@ -18,11 +18,11 @@ const example: LearningObjectExample = {
learningObject.description = "Leren werken met notebooks";
learningObject.keywords = ["Python", "KIKS", "Wiskunde", "STEM", "AI"]
let educationalGoal1 = new EducationalGoal();
const educationalGoal1 = new EducationalGoal();
educationalGoal1.source = "Source";
educationalGoal1.id = "id";
let educationalGoal2 = new EducationalGoal();
const educationalGoal2 = new EducationalGoal();
educationalGoal2.source = "Source2";
educationalGoal2.id = "id2";
@ -39,7 +39,7 @@ const example: LearningObjectExample = {
learningObject.license = "dwengo";
learningObject.estimatedTime = 10;
let returnValue = new ReturnValue();
const returnValue = new ReturnValue();
returnValue.callbackUrl = "callback_url_example";
returnValue.callbackSchema = '{"att": "test", "att2": "test2"}';
@ -51,7 +51,7 @@ const example: LearningObjectExample = {
},
createAttachment: {
dwengoLogo: (learningObject) => {
let att = new Attachment();
const att = new Attachment();
att.learningObject = learningObject;
att.name = "dwengo.png";
att.mimeType = "image/png";
@ -59,7 +59,7 @@ const example: LearningObjectExample = {
return att;
},
knop: (learningObject) => {
let att = new Attachment();
const att = new Attachment();
att.learningObject = learningObject;
att.name = "Knop.png";
att.mimeType = "image/png";

View file

@ -4,7 +4,7 @@ import {LearningPathNode} from "../../../src/entities/content/learning-path-node
import {LearningPath} from "../../../src/entities/content/learning-path.entity";
export function createLearningPathTransition(node: LearningPathNode, transitionNumber: number, condition: string | null, to: LearningPathNode) {
let trans = new LearningPathTransition();
const trans = new LearningPathTransition();
trans.node = node;
trans.transitionNumber = transitionNumber;
trans.condition = condition || "true";
@ -20,7 +20,7 @@ export function createLearningPathNode(
language: Language,
startNode: boolean
) {
let node = new LearningPathNode();
const node = new LearningPathNode();
node.learningPath = learningPath;
node.nodeNumber = nodeNumber;
node.learningObjectHruid = learningObjectHruid;

View file

@ -5,7 +5,7 @@ import {createLearningPathNode, createLearningPathTransition} from "./learning-p
import {LearningPathNode} from "../../../src/entities/content/learning-path-node.entity";
function createNodes(learningPath: LearningPath): LearningPathNode[] {
let nodes = [
const nodes = [
createLearningPathNode(learningPath, 0, "u_pn_werkingnotebooks", 3, Language.Dutch, true),
createLearningPathNode(learningPath, 1, "pn_werkingnotebooks2", 3, Language.Dutch, false),
createLearningPathNode(learningPath, 2, "pn_werkingnotebooks3", 3, Language.Dutch, false),