MDL-79003 eslint: Enable 'reportUnusedDisableDirectives' eslint setting

This commit is a backport of MDL-74301 which should have been backported
at the time.

This will warn on unused /* eslint-disable */ statements.
This commit is contained in:
Ruslan Kabalin
2024-01-30 13:32:34 +08:00
committed by Andrew Nicols
parent deb801fadc
commit 95458aa709
7 changed files with 5 additions and 7 deletions
+2
View File
@@ -20,6 +20,8 @@
'M': true,
'Y': true
},
// Warn about unused eslint-disable statements.
'reportUnusedDisableDirectives': true,
'rules': {
// See http://eslint.org/docs/rules/ for all rules and explanations of all
// rules.
File diff suppressed because one or more lines are too long
-2
View File
@@ -71,14 +71,12 @@ define(['jquery'], function($) {
return null;
};
// eslint-disable-line valid-jsdoc
/**
* Return the type of the module.
*
* @return {String}
* @method getType
*/
// eslint-enable-line valid-jsdoc
Rule.prototype.getType = function() {
throw new Error('Not implemented');
};
File diff suppressed because one or more lines are too long
@@ -121,7 +121,6 @@ define(['tool_moodlenet/validator',
});
// Trigger the transition between 'pages'.
carousel.carousel(2);
// eslint-disable-next-line max-len
modal.setFooter(Templates.render('tool_moodlenet/chooser_footer_close_mnet', {}));
};
File diff suppressed because one or more lines are too long
-1
View File
@@ -180,7 +180,6 @@ const attemptFocus = focusTarget => {
focusTarget.focus();
} catch (e) {
// Ignore failures. We will just try to focus the next element in the list.
// eslint-disable-line
}
ignoreFocusChanges = false;