danielfloresd / team-profile-generator

Avoid using console in code that runs on browser JS-0002
Bug risk
Major
6 occurrences in this check
Avoid using console in code that runs on the browser
17    for (const key in colors) {
18      // Each color method calls console.log with the color as the first argument,followed by any additional arguments.
19      Logger.prototype[key] = function(...args) {
20        console.log(colors[key], ...args);21      };
22    }
23  }
Avoid using console in code that runs on the browser
 98        const email = $('#intern-email').val();
 99        const school = $('#intern-school').val();
100
101        console.log("Intern", name, id, email, school);102        // Create new manager object
103        try {
104            const intern = new Intern(name, id, email, school);
Avoid using console in code that runs on the browser
 73        const email = $('#engineer-email').val();
 74        const github = $('#engineer-github').val();
 75
 76        console.log("Engineer", name, id, email, github); 77        // Create new manager object
 78        try {
 79            const engineer = new Engineer(name, id, email, github);
Avoid using console in code that runs on the browser
 48        const email = $('#manager-email').val();
 49        const officeNumber = parseInt($('#manager-office').val());
 50
 51        console.log("Manager", name, id, email, officeNumber); 52        // Create new manager object
 53        try {
 54            const manager = new Manager(name, id, email, officeNumber);
Avoid using console in code that runs on the browser
 42    // Add manager-add button listener
 43    $('#manager-add').on('click', function () {
 44        // Get values from form
 45        console.log("Manager button clicked"); 46        const name = $('#manager').val();
 47        const id = parseInt($('#manager-id').val());
 48        const email = $('#manager-email').val();
Avoid using console in code that runs on the browser
306const writeToFile = (documentName, documentBody) => {
307    let fileName = "./dist/" + documentName;
308    fs.writeFile(fileName, documentBody, (err) =>
309        err ? console.error(err) : console.log("HTML document successfully created at " + fileName));310
311}
312