diff --git a/src/extensions/default/CSSCodeHints/css-lint.js b/src/extensions/default/CSSCodeHints/css-lint.js index 7fe03a5a8..3fcfef070 100644 --- a/src/extensions/default/CSSCodeHints/css-lint.js +++ b/src/extensions/default/CSSCodeHints/css-lint.js @@ -79,6 +79,9 @@ define(function (require, exports, module) { resolve({ errors: lintResult }); } resolve(); + }).catch(err=>{ + console.error("CSS Lint failed:", err); + reject(new Error("CSS Lint failed as CSS Lint plugin is not yet loaded. Please try again.")); }); }); } diff --git a/src/extensions/default/HTMLCodeHints/html-lint.js b/src/extensions/default/HTMLCodeHints/html-lint.js index 3cf5e2bd2..aa10ec1d8 100644 --- a/src/extensions/default/HTMLCodeHints/html-lint.js +++ b/src/extensions/default/HTMLCodeHints/html-lint.js @@ -112,6 +112,9 @@ define(function (require, exports, module) { resolve({ errors: lintResult }); } resolve(); + }).catch(err=>{ + console.error("HTML Lint failed:", err); + reject(new Error("HTML Lint failed as HTML plugin is not yet loaded. Please try again.")); }); }); } diff --git a/src/extensions/default/JSLint/JSHint.js b/src/extensions/default/JSLint/JSHint.js index 825538c72..83e569ce4 100644 --- a/src/extensions/default/JSLint/JSHint.js +++ b/src/extensions/default/JSLint/JSHint.js @@ -87,7 +87,7 @@ define(function (require, exports, module) { * a gold star when no errors are found. */ async function lintOneFile(text, _fullPath) { - return new Promise((resolve)=>{ + return new Promise((resolve, reject)=>{ if(jsHintConfigFileErrorMessage){ resolve({ errors: _getLinterConfigFileErrorMsg() }); return; @@ -118,6 +118,9 @@ define(function (require, exports, module) { resolve({ errors: errors }); } resolve(); + }).catch(err=>{ + console.error("JSHint failed:", err); + reject(new Error("JSHint failed as JSHint plugin is not yet loaded. Please try again.")); }); }); }