trileg/WebTeX

View on GitHub

Showing 47 of 47 total issues

Unexpected alert.
Open

          alert("Failed to remove directory");
Severity: Minor
Found in WebTeX/static/js/main.js by eslint

Disallow Use of Alert (no-alert)

JavaScript's alert, confirm, and prompt functions are widely considered to be obtrusive as UI elements and should be replaced by a more appropriate custom UI implementation. Furthermore, alert is often used while debugging code, which should be removed before deployment to production.

alert("here!");

Rule Details

This rule is aimed at catching debugging code that should be removed and popup UI elements that should be replaced with less obtrusive, custom UIs. As such, it will warn when it encounters alert, prompt, and confirm function calls which are not shadowed.

Examples of incorrect code for this rule:

/*eslint no-alert: "error"*/

alert("here!");

confirm("Are you sure?");

prompt("What's your name?", "John Doe");

Examples of correct code for this rule:

/*eslint no-alert: "error"*/

customAlert("Something happened!");

customConfirm("Are you sure?");

customPrompt("Who are you?");

function foo() {
    var alert = myCustomLib.customAlert;
    alert();
}

Related Rules

Don't use IDs in selectors.
Open

#main-col {
Severity: Minor
Found in WebTeX/static/css/redpen.css by csslint

Don't use IDs in selectors.
Open

#editor {
Severity: Minor
Found in WebTeX/static/css/editor.css by csslint

Don't use IDs in selectors.
Open

#editor {
Severity: Minor
Found in WebTeX/static/css/redpen.css by csslint

Don't use IDs in selectors.
Open

#result {
Severity: Minor
Found in WebTeX/static/css/redpen.css by csslint

Don't use IDs in selectors.
Open

#main {
Severity: Minor
Found in WebTeX/static/css/preference.css by csslint

Unexpected confirm.
Open

  if (!confirm("Remove directory: "+escapeHTML(directoryItem)+"\nAre you sure?")) {
Severity: Minor
Found in WebTeX/static/js/main.js by eslint

Disallow Use of Alert (no-alert)

JavaScript's alert, confirm, and prompt functions are widely considered to be obtrusive as UI elements and should be replaced by a more appropriate custom UI implementation. Furthermore, alert is often used while debugging code, which should be removed before deployment to production.

alert("here!");

Rule Details

This rule is aimed at catching debugging code that should be removed and popup UI elements that should be replaced with less obtrusive, custom UIs. As such, it will warn when it encounters alert, prompt, and confirm function calls which are not shadowed.

Examples of incorrect code for this rule:

/*eslint no-alert: "error"*/

alert("here!");

confirm("Are you sure?");

prompt("What's your name?", "John Doe");

Examples of correct code for this rule:

/*eslint no-alert: "error"*/

customAlert("Something happened!");

customConfirm("Are you sure?");

customPrompt("Who are you?");

function foo() {
    var alert = myCustomLib.customAlert;
    alert();
}

Related Rules

Severity
Category
Status
Source
Language