MDL-54944 eslint: make the .eslintrc default stricter
authorDan Poltawski <dan@moodle.com>
Wed, 29 Jun 2016 15:31:31 +0000 (16:31 +0100)
committerDan Poltawski <dan@moodle.com>
Mon, 11 Jul 2016 11:44:34 +0000 (12:44 +0100)
Instead of using the more rollup-tolerant config for all files, make the
configuration stricter by default but lower in grunt for yui modules.

This means that manual runs (prechecker) or editor integrations will
flag up the errors as well as grunt.

Also add ignore lines to the core files so that eslint isn't noisy when
not running with grunt.

100 files changed:
.eslintrc
Gruntfile.js
course/yui/build/moodle-course-dragdrop/moodle-course-dragdrop-debug.js
course/yui/build/moodle-course-dragdrop/moodle-course-dragdrop.js
course/yui/build/moodle-course-management/moodle-course-management-debug.js
course/yui/build/moodle-course-management/moodle-course-management.js
course/yui/build/moodle-course-toolboxes/moodle-course-toolboxes-debug.js
course/yui/build/moodle-course-toolboxes/moodle-course-toolboxes.js
course/yui/src/dragdrop/js/dragdrop.js
course/yui/src/management/js/category.js
course/yui/src/management/js/console.js
course/yui/src/management/js/course.js
course/yui/src/management/js/dd.js
course/yui/src/toolboxes/js/resource.js
course/yui/src/toolboxes/js/section.js
course/yui/src/toolboxes/js/toolbox.js
grade/report/grader/yui/build/moodle-gradereport_grader-gradereporttable/moodle-gradereport_grader-gradereporttable-debug.js
grade/report/grader/yui/build/moodle-gradereport_grader-gradereporttable/moodle-gradereport_grader-gradereporttable.js
grade/report/grader/yui/src/gradereporttable/js/floatingheaders.js
grade/report/grader/yui/src/gradereporttable/js/gradereporttable.js
lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js
lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor.js
lib/editor/atto/yui/build/moodle-editor_atto-plugin/moodle-editor_atto-plugin-debug.js
lib/editor/atto/yui/build/moodle-editor_atto-plugin/moodle-editor_atto-plugin.js
lib/editor/atto/yui/src/editor/js/autosave.js
lib/editor/atto/yui/src/editor/js/clean.js
lib/editor/atto/yui/src/editor/js/editor-plugin-buttons.js
lib/editor/atto/yui/src/editor/js/editor.js
lib/editor/atto/yui/src/editor/js/lintconfig.js [deleted file]
lib/editor/atto/yui/src/editor/js/selection.js
lib/editor/atto/yui/src/editor/js/styling.js
lib/editor/atto/yui/src/editor/js/toolbar-keyboardnav.js
lib/form/yui/build/moodle-form-dateselector/moodle-form-dateselector-debug.js
lib/form/yui/build/moodle-form-dateselector/moodle-form-dateselector.js
lib/form/yui/src/dateselector/js/dateselector.js
lib/yui/build/moodle-core-blocks/moodle-core-blocks-debug.js
lib/yui/build/moodle-core-blocks/moodle-core-blocks.js
lib/yui/build/moodle-core-dock/moodle-core-dock-debug.js
lib/yui/build/moodle-core-dock/moodle-core-dock.js
lib/yui/build/moodle-core-languninstallconfirm/moodle-core-languninstallconfirm-debug.js
lib/yui/build/moodle-core-languninstallconfirm/moodle-core-languninstallconfirm.js
lib/yui/build/moodle-core-notification-ajaxexception/moodle-core-notification-ajaxexception-debug.js
lib/yui/build/moodle-core-notification-ajaxexception/moodle-core-notification-ajaxexception.js
lib/yui/build/moodle-core-notification-alert/moodle-core-notification-alert-debug.js
lib/yui/build/moodle-core-notification-alert/moodle-core-notification-alert.js
lib/yui/build/moodle-core-notification-confirm/moodle-core-notification-confirm-debug.js
lib/yui/build/moodle-core-notification-confirm/moodle-core-notification-confirm.js
lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-debug.js
lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue.js
lib/yui/build/moodle-core-notification-exception/moodle-core-notification-exception-debug.js
lib/yui/build/moodle-core-notification-exception/moodle-core-notification-exception.js
lib/yui/src/blocks/js/blockregion.js
lib/yui/src/blocks/js/blocks.js
lib/yui/src/blocks/js/manager.js
lib/yui/src/dock/js/block.js
lib/yui/src/dock/js/dock.js
lib/yui/src/dock/js/dockeditem.js
lib/yui/src/dock/js/panel.js
lib/yui/src/dock/js/tabheightmanager.js
lib/yui/src/languninstallconfirm/js/languninstallconfirm.js
lib/yui/src/notification/js/ajaxexception.js
lib/yui/src/notification/js/alert.js
lib/yui/src/notification/js/confirm.js
lib/yui/src/notification/js/dialogue.js
lib/yui/src/notification/js/exception.js
lib/yui/src/notification/js/info.js
lib/yui/src/notification/js/shared.js
message/yui/build/moodle-core_message-messenger/moodle-core_message-messenger-debug.js
message/yui/build/moodle-core_message-messenger/moodle-core_message-messenger.js
message/yui/src/messenger/js/constants.js
message/yui/src/messenger/js/manager.js
message/yui/src/messenger/js/sendmessage.js
mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-debug.js
mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor.js
mod/assign/feedback/editpdf/yui/src/editor/js/annotation.js
mod/assign/feedback/editpdf/yui/src/editor/js/annotationhighlight.js
mod/assign/feedback/editpdf/yui/src/editor/js/annotationline.js
mod/assign/feedback/editpdf/yui/src/editor/js/annotationoval.js
mod/assign/feedback/editpdf/yui/src/editor/js/annotationpen.js
mod/assign/feedback/editpdf/yui/src/editor/js/annotationrectangle.js
mod/assign/feedback/editpdf/yui/src/editor/js/annotationstamp.js
mod/assign/feedback/editpdf/yui/src/editor/js/comment.js
mod/assign/feedback/editpdf/yui/src/editor/js/commentsearch.js
mod/assign/feedback/editpdf/yui/src/editor/js/drawable.js
mod/assign/feedback/editpdf/yui/src/editor/js/editor.js
mod/assign/feedback/editpdf/yui/src/editor/js/globals.js
mod/assign/feedback/editpdf/yui/src/editor/js/quickcommentlist.js
mod/quiz/yui/build/moodle-mod_quiz-dragdrop/moodle-mod_quiz-dragdrop-debug.js
mod/quiz/yui/build/moodle-mod_quiz-dragdrop/moodle-mod_quiz-dragdrop.js
mod/quiz/yui/build/moodle-mod_quiz-toolboxes/moodle-mod_quiz-toolboxes-debug.js
mod/quiz/yui/build/moodle-mod_quiz-toolboxes/moodle-mod_quiz-toolboxes-min.js
mod/quiz/yui/build/moodle-mod_quiz-toolboxes/moodle-mod_quiz-toolboxes.js
mod/quiz/yui/build/moodle-mod_quiz-util-page/moodle-mod_quiz-util-page-debug.js
mod/quiz/yui/build/moodle-mod_quiz-util-page/moodle-mod_quiz-util-page.js
mod/quiz/yui/src/dragdrop/js/dragdrop.js
mod/quiz/yui/src/dragdrop/js/resource.js
mod/quiz/yui/src/toolboxes/js/resource.js
mod/quiz/yui/src/toolboxes/js/section.js
mod/quiz/yui/src/toolboxes/js/toolbox.js
mod/quiz/yui/src/util/js/page.js

index 02fc3a3..c701962 100644 (file)
--- a/.eslintrc
+++ b/.eslintrc
@@ -63,7 +63,7 @@
     'no-extra-bind': 'warn',
     'no-fallthrough': 'error',
     'no-floating-decimal': 'warn',
-    // Disabled for YUI rollups, enabled by grunt for AMD: 'no-implicit-globals': 'warn',
+    // Enabled by grunt for AMD modules: 'no-implicit-globals': 'error',
     'no-implied-eval': 'error',
     'no-invalid-this': 'error',
     'no-iterator': 'error',
@@ -85,7 +85,7 @@
     'no-sequences': 'warn',
     'no-throw-literal': 'warn',
     'no-unmodified-loop-condition': 'error',
-    // Disabled for YUI rollups, enabled by grunt for AMD: 'no-unused-expressions': 'error',
+    'no-unused-expressions': 'error',
     'no-unused-labels': 'error',
     'no-useless-call': 'warn',
     'no-useless-escape': 'warn',
@@ -94,9 +94,9 @@
 
     // === Variables ===
     'no-delete-var': 'error',
-    // Disabled for YUI rollups, enabled by grunt for AMD: 'no-undef': 'off',
+    'no-undef': 'error',
     'no-undef-init': 'error',
-    // Disabled for YUI rollups, enabled by grunt for AMD: 'no-unused-vars': 'error',
+    'no-unused-vars': ['error', { 'caughtErrors': 'none', 'argsIgnorePattern': "(e|event)" }],
 
     // === Stylistic Issues ===
     'array-bracket-spacing': 'warn',
index 5dd95e2..4e22a6e 100644 (file)
@@ -105,22 +105,25 @@ module.exports = function(grunt) {
             // Even though warnings dont stop the build we don't display warnings by default because
             // at this moment we've got too many core warnings.
             options: {quiet: !grunt.option('show-lint-warnings')},
-            // Check AMD files. We add some stricter rules which we can't apply to the default configuration due
-            // to YUI rollups.
             amd: {
               src: amdSrc,
-              options: {
-                  rules: {
-                    'no-undef': 'error',
-                    'no-unused-vars': 'error',
-                    'no-unused-expressions': 'error',
-                    'no-implicit-globals': 'error'
-                  }
+              // Check AMD with some slightly stricter rules.
+              rules: {
+                'no-unused-vars': 'error',
+                'no-implicit-globals': 'error'
               }
             },
             // Check YUI module source files.
             yui: {
                src: ['**/yui/src/**/*.js', '!*/**/yui/src/*/meta/*.js'],
+               options: {
+                   // Disable some rules which we can't safely define for YUI rollups.
+                   rules: {
+                     'no-undef': 'off',
+                     'no-unused-vars': 'off',
+                     'no-unused-expressions': 'off'
+                   }
+               }
             }
         },
         uglify: {
index fe94ff0..d10c10e 100644 (file)
Binary files a/course/yui/build/moodle-course-dragdrop/moodle-course-dragdrop-debug.js and b/course/yui/build/moodle-course-dragdrop/moodle-course-dragdrop-debug.js differ
index 7befde3..76a249b 100644 (file)
Binary files a/course/yui/build/moodle-course-dragdrop/moodle-course-dragdrop.js and b/course/yui/build/moodle-course-dragdrop/moodle-course-dragdrop.js differ
index 0b3587a..57e0b16 100644 (file)
Binary files a/course/yui/build/moodle-course-management/moodle-course-management-debug.js and b/course/yui/build/moodle-course-management/moodle-course-management-debug.js differ
index 883b964..35520d1 100644 (file)
Binary files a/course/yui/build/moodle-course-management/moodle-course-management.js and b/course/yui/build/moodle-course-management/moodle-course-management.js differ
index 212e98d..4d7656b 100644 (file)
Binary files a/course/yui/build/moodle-course-toolboxes/moodle-course-toolboxes-debug.js and b/course/yui/build/moodle-course-toolboxes/moodle-course-toolboxes-debug.js differ
index 212e98d..4d7656b 100644 (file)
Binary files a/course/yui/build/moodle-course-toolboxes/moodle-course-toolboxes.js and b/course/yui/build/moodle-course-toolboxes/moodle-course-toolboxes.js differ
index 00b30d4..b1e3ef5 100644 (file)
@@ -1,3 +1,4 @@
+/* eslint-disable no-unused-vars */
 /**
  * Drag and Drop for course sections and course modules.
  *
index b7fac22..889ccec 100644 (file)
@@ -1,3 +1,5 @@
+/* global Item */
+
 /**
  * A managed category.
  *
index 0a00ab1..12ca9be 100644 (file)
@@ -1,3 +1,5 @@
+/* global DragDrop, Category, Course */
+
 /**
  * Provides drop down menus for list of action links.
  *
index 474180a..893b21c 100644 (file)
@@ -1,3 +1,5 @@
+/* global Item */
+
 /**
  * A managed course.
  *
index 3ad3e0f..f622d29 100644 (file)
@@ -1,3 +1,5 @@
+/* global Console */
+
 /**
  * Drag and Drop handler
  *
index f475b89..4d87574 100644 (file)
@@ -1,3 +1,5 @@
+/* global TOOLBOX, BODY, SELECTOR, INDENTLIMITS */
+
 /**
  * Resource and activity toolbox class.
  *
index fe9b84e..a28ca9a 100644 (file)
@@ -1,3 +1,5 @@
+/* global SELECTOR, TOOLBOX */
+
 /**
  * Resource and activity toolbox class.
  *
index e3f6c8a..019b359 100644 (file)
@@ -1,3 +1,4 @@
+/* eslint-disable no-unused-vars */
 /**
  * Resource and activity toolbox class.
  *
@@ -196,4 +197,3 @@ Y.extend(TOOLBOX, Y.Base, {
     }
 }
 );
-
index c185c23..e3a184c 100644 (file)
Binary files a/grade/report/grader/yui/build/moodle-gradereport_grader-gradereporttable/moodle-gradereport_grader-gradereporttable-debug.js and b/grade/report/grader/yui/build/moodle-gradereport_grader-gradereporttable/moodle-gradereport_grader-gradereporttable-debug.js differ
index ac36953..f9fa8f6 100644 (file)
Binary files a/grade/report/grader/yui/build/moodle-gradereport_grader-gradereporttable/moodle-gradereport_grader-gradereporttable.js and b/grade/report/grader/yui/build/moodle-gradereport_grader-gradereporttable/moodle-gradereport_grader-gradereporttable.js differ
index a57aed8..4343ba7 100644 (file)
@@ -12,6 +12,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* global SELECTORS */
 
 /**
  * @module moodle-gradereport_grader-gradereporttable
index bbdbd8f..8cc3e10 100644 (file)
@@ -12,6 +12,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* eslint-disable no-unused-vars */
 
 /**
  * Grader Report Functionality.
index d10c55a..731161c 100644 (file)
Binary files a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js and b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js differ
index 41bd2cd..0c89fae 100644 (file)
Binary files a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor.js and b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor.js differ
index 41e53ad..73ae0b5 100644 (file)
Binary files a/lib/editor/atto/yui/build/moodle-editor_atto-plugin/moodle-editor_atto-plugin-debug.js and b/lib/editor/atto/yui/build/moodle-editor_atto-plugin/moodle-editor_atto-plugin-debug.js differ
index e436da5..6096475 100644 (file)
Binary files a/lib/editor/atto/yui/build/moodle-editor_atto-plugin/moodle-editor_atto-plugin.js and b/lib/editor/atto/yui/build/moodle-editor_atto-plugin/moodle-editor_atto-plugin.js differ
index 27f227a..7df539e 100644 (file)
@@ -12,6 +12,8 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* global NOTIFY_WARNING, NOTIFY_INFO */
+/* eslint-disable no-unused-vars */
 
 /**
  * A autosave function for the Atto editor.
index 5b86018..cbcce69 100644 (file)
@@ -12,6 +12,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* global LOGNAME */
 
 /**
  * @module moodle-editor_atto-editor
index b7f5eff..5048ddf 100644 (file)
@@ -12,6 +12,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* global YUI */
 
 /**
  * @module moodle-editor_atto-plugin
index 8089a11..cba8839 100644 (file)
@@ -12,6 +12,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* eslint-disable no-unused-vars */
 
 /**
  * The Atto WYSIWG pluggable editor, written for Moodle.
diff --git a/lib/editor/atto/yui/src/editor/js/lintconfig.js b/lib/editor/atto/yui/src/editor/js/lintconfig.js
deleted file mode 100644 (file)
index 9291d3b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/* globals rangy */
index 3f6c460..077794e 100644 (file)
@@ -12,6 +12,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* global rangy */
 
 /**
  * @module moodle-editor_atto-editor
index 6c31d81..3e5c1a4 100644 (file)
@@ -12,6 +12,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* global rangy */
 
 /**
  * @module moodle-editor_atto-editor
index 3c056a3..26cf46e 100644 (file)
@@ -12,6 +12,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* global LOGNAME */
 
 /**
  * @module moodle-editor_atto-editor
index 3c6e027..a9831d9 100644 (file)
Binary files a/lib/form/yui/build/moodle-form-dateselector/moodle-form-dateselector-debug.js and b/lib/form/yui/build/moodle-form-dateselector/moodle-form-dateselector-debug.js differ
index 3c6e027..a9831d9 100644 (file)
Binary files a/lib/form/yui/build/moodle-form-dateselector/moodle-form-dateselector.js and b/lib/form/yui/build/moodle-form-dateselector/moodle-form-dateselector.js differ
index a0b09a4..aa9c4fb 100644 (file)
@@ -1,3 +1,5 @@
+/* global CALENDAR, MOODLECALENDAR */
+
 /**
  * Add some custom methods to the node class to make our lives a little
  * easier within this module.
index bf0bb93..f0fc38a 100644 (file)
Binary files a/lib/yui/build/moodle-core-blocks/moodle-core-blocks-debug.js and b/lib/yui/build/moodle-core-blocks/moodle-core-blocks-debug.js differ
index 5deddfc..81585d1 100644 (file)
Binary files a/lib/yui/build/moodle-core-blocks/moodle-core-blocks.js and b/lib/yui/build/moodle-core-blocks/moodle-core-blocks.js differ
index 6d060fb..b41f36d 100644 (file)
Binary files a/lib/yui/build/moodle-core-dock/moodle-core-dock-debug.js and b/lib/yui/build/moodle-core-dock/moodle-core-dock-debug.js differ
index 35bb1e3..8c1be7e 100644 (file)
Binary files a/lib/yui/build/moodle-core-dock/moodle-core-dock.js and b/lib/yui/build/moodle-core-dock/moodle-core-dock.js differ
index 93c4c97..f0568c9 100644 (file)
Binary files a/lib/yui/build/moodle-core-languninstallconfirm/moodle-core-languninstallconfirm-debug.js and b/lib/yui/build/moodle-core-languninstallconfirm/moodle-core-languninstallconfirm-debug.js differ
index 93c4c97..f0568c9 100644 (file)
Binary files a/lib/yui/build/moodle-core-languninstallconfirm/moodle-core-languninstallconfirm.js and b/lib/yui/build/moodle-core-languninstallconfirm/moodle-core-languninstallconfirm.js differ
index bebacc1..262fce7 100644 (file)
Binary files a/lib/yui/build/moodle-core-notification-ajaxexception/moodle-core-notification-ajaxexception-debug.js and b/lib/yui/build/moodle-core-notification-ajaxexception/moodle-core-notification-ajaxexception-debug.js differ
index bebacc1..262fce7 100644 (file)
Binary files a/lib/yui/build/moodle-core-notification-ajaxexception/moodle-core-notification-ajaxexception.js and b/lib/yui/build/moodle-core-notification-ajaxexception/moodle-core-notification-ajaxexception.js differ
index 1fa7732..7c299a7 100644 (file)
Binary files a/lib/yui/build/moodle-core-notification-alert/moodle-core-notification-alert-debug.js and b/lib/yui/build/moodle-core-notification-alert/moodle-core-notification-alert-debug.js differ
index 1fa7732..7c299a7 100644 (file)
Binary files a/lib/yui/build/moodle-core-notification-alert/moodle-core-notification-alert.js and b/lib/yui/build/moodle-core-notification-alert/moodle-core-notification-alert.js differ
index 459e595..8f30935 100644 (file)
Binary files a/lib/yui/build/moodle-core-notification-confirm/moodle-core-notification-confirm-debug.js and b/lib/yui/build/moodle-core-notification-confirm/moodle-core-notification-confirm-debug.js differ
index 459e595..8f30935 100644 (file)
Binary files a/lib/yui/build/moodle-core-notification-confirm/moodle-core-notification-confirm.js and b/lib/yui/build/moodle-core-notification-confirm/moodle-core-notification-confirm.js differ
index 86f372c..e385329 100644 (file)
Binary files a/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-debug.js and b/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-debug.js differ
index 26caaf2..78d4e12 100644 (file)
Binary files a/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue.js and b/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue.js differ
index 6f43932..137b746 100644 (file)
Binary files a/lib/yui/build/moodle-core-notification-exception/moodle-core-notification-exception-debug.js and b/lib/yui/build/moodle-core-notification-exception/moodle-core-notification-exception-debug.js differ
index 6f43932..137b746 100644 (file)
Binary files a/lib/yui/build/moodle-core-notification-exception/moodle-core-notification-exception.js and b/lib/yui/build/moodle-core-notification-exception/moodle-core-notification-exception.js differ
index cf981d2..98d6401 100644 (file)
@@ -1,3 +1,5 @@
+/* global MANAGER */
+
 /**
  * This file contains the Block Region class used by the drag and drop manager.
  *
index f2e3eab..ca1a15d 100644 (file)
@@ -1,3 +1,5 @@
+/* global MANAGER */
+
 /**
  * Provides drag and drop functionality for blocks.
  *
index 97b28f8..f8eab03 100644 (file)
@@ -1,3 +1,5 @@
+/* global BLOCKREGION, SELECTOR, AJAXURL */
+
 /**
  * This file contains the drag and drop manager class.
  *
index 824fd3c..68693ef 100644 (file)
@@ -1,3 +1,5 @@
+/* global BLOCK, LOGNS, DOCKEDITEM */
+
 /**
  * Dock JS.
  *
index e16d3e4..7c8a0df 100644 (file)
@@ -6,7 +6,6 @@
  * @module moodle-core-dock
  */
 
-
 var LOGNS = 'moodle-core-dock',
     BODY = Y.one(Y.config.doc.body),
     CSS = {
@@ -32,7 +31,7 @@ var LOGNS = 'moodle-core-dock',
     DOCKPANEL,
     TABHEIGHTMANAGER,
     BLOCK,
-    DOCKEDITEM;
+    DOCKEDITEM; // eslint-disable-line no-unused-vars
 
 M.core = M.core || {};
 M.core.dock = M.core.dock || {};
index d0d6431..b18eac8 100644 (file)
@@ -1,3 +1,5 @@
+/* global LOGNS, DOCKEDITEM */
+
 /**
  * Dock JS.
  *
index fd50c44..59e39e3 100644 (file)
@@ -1,3 +1,5 @@
+/* global DOCKPANEL, LOGNS */
+
 /**
  * Dock JS.
  *
index 28aaff4..b8d4851 100644 (file)
@@ -1,3 +1,5 @@
+/* global TABHEIGHTMANAGER, LOGNS */
+
 /**
  * Dock JS.
  *
index b4dddc9..c157115 100644 (file)
@@ -1,3 +1,5 @@
+/* global BASE, DIALOGUE_PREFIX */
+
 /**
  * A dialogue type designed to display an appropriate error when an error
  * thrown in the Moodle codebase was reported during an AJAX request.
index d2acd6c..5e001a5 100644 (file)
@@ -1,3 +1,5 @@
+/* global BASE, TITLE, CONFIRMYES, DIALOGUE_PREFIX */
+
 /**
  * A dialogue type designed to display an alert to the user.
  *
index f26a159..94e6553 100644 (file)
@@ -1,3 +1,5 @@
+/* global CONFIRMYES, CONFIRMNO, QUESTION, BASE, TITLE, DIALOGUE_PREFIX */
+
 /**
  * A dialogue type designed to display a confirmation to the user.
  *
index 8f0220c..7910276 100644 (file)
@@ -1,3 +1,5 @@
+/* global DIALOGUE_PREFIX, BASE */
+
 /**
  * The generic dialogue class for use in Moodle.
  *
index cddb8f3..2dff285 100644 (file)
@@ -1,3 +1,5 @@
+/* global BASE, DIALOGUE_PREFIX */
+
 /**
  * A dialogue type designed to display an appropriate error when a generic
  * javascript error was thrown and caught.
index 70b76a7..a863e9f 100644 (file)
@@ -1,3 +1,5 @@
+/* global DIALOGUE_PREFIX */
+
 /**
  * A dialogue type designed to display informative messages to users.
  *
index 362bd76..f271df3 100644 (file)
@@ -1,3 +1,4 @@
+/* eslint-disable no-unused-vars, no-unused-expressions */
 var DIALOGUE_PREFIX,
     BASE,
     CONFIRMYES,
index f24feb0..61d6d44 100644 (file)
Binary files a/message/yui/build/moodle-core_message-messenger/moodle-core_message-messenger-debug.js and b/message/yui/build/moodle-core_message-messenger/moodle-core_message-messenger-debug.js differ
index f24feb0..61d6d44 100644 (file)
Binary files a/message/yui/build/moodle-core_message-messenger/moodle-core_message-messenger.js and b/message/yui/build/moodle-core_message-messenger/moodle-core_message-messenger.js differ
index b667fcd..4e3adb1 100644 (file)
@@ -12,6 +12,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* eslint-disable no-unused-vars */
 
 /**
  * Messenger constants.
index 916d51d..559529a 100644 (file)
@@ -12,6 +12,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* global SELECTORS */
 
 /**
  * Messenger manager.
index 8998638..1196010 100644 (file)
@@ -12,6 +12,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* global CSSR, SELECTORS */
 
 /**
  * Send message dialog.
index d872488..3d815bd 100644 (file)
Binary files a/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-debug.js and b/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-debug.js differ
index d872488..3d815bd 100644 (file)
Binary files a/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor.js and b/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor.js differ
index 5415add..536b214 100644 (file)
@@ -12,6 +12,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* global STROKEWEIGHT, SELECTOR, SELECTEDBORDERCOLOUR, SELECTEDFILLCOLOUR */
 
 /**
  * Provides an in browser PDF editor.
index 3a2719b..f80f629 100644 (file)
@@ -12,6 +12,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* global ANNOTATIONCOLOUR */
 
 /**
  * Provides an in browser PDF editor.
index 9bf2499..fedd717 100644 (file)
@@ -12,6 +12,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* global STROKEWEIGHT, ANNOTATIONCOLOUR */
 
 /**
  * Provides an in browser PDF editor.
index 9b878e8..0584e38 100644 (file)
@@ -12,6 +12,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* global STROKEWEIGHT, ANNOTATIONCOLOUR */
 
 /**
  * Provides an in browser PDF editor.
index 6a857d1..55fb5c4 100644 (file)
@@ -12,6 +12,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* global STROKEWEIGHT, ANNOTATIONCOLOUR */
 
 /**
  * Provides an in browser PDF editor.
index 2b640ae..3e04084 100644 (file)
@@ -12,6 +12,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* global STROKEWEIGHT, ANNOTATIONCOLOUR */
 
 /**
  * Provides an in browser PDF editor.
index 9d1c646..9d209c5 100644 (file)
@@ -12,6 +12,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* global SELECTOR */
 
 /**
  * Provides an in browser PDF editor.
index 53f91c7..0d5a965 100644 (file)
@@ -12,6 +12,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* global SELECTOR, COMMENTCOLOUR, COMMENTTEXTCOLOUR */
 
 /**
  * Provides an in browser PDF editor.
index 73b2657..ac378ca 100644 (file)
@@ -1,3 +1,5 @@
+/* eslint-disable no-unused-vars */
+/* global SELECTOR */
 var COMMENTSEARCHNAME = "commentsearch",
     COMMENTSEARCH;
 
index 21e368c..d17fad0 100644 (file)
@@ -12,6 +12,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* global SELECTOR */
 
 /**
  * Provides an in browser PDF editor.
index 8d842f8..d0fc76a 100644 (file)
@@ -12,6 +12,8 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* eslint-disable no-unused-vars */
+/* global SELECTOR, TOOLSELECTOR, AJAXBASE, COMMENTCOLOUR, ANNOTATIONCOLOUR, AJAXBASEPROGRESS, CLICKTIMEOUT */
 
 /**
  * Provides an in browser PDF editor.
index 7b5eba1..4a2b3df 100644 (file)
@@ -12,6 +12,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* eslint-disable no-unused-vars */
 
 /**
  * A list of globals used by this module.
index e92f664..9893191 100644 (file)
@@ -12,6 +12,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+/* global AJAXBASE */
 
 /**
  * Provides an in browser PDF editor.
index d733d38..8dee2d6 100644 (file)
Binary files a/mod/quiz/yui/build/moodle-mod_quiz-dragdrop/moodle-mod_quiz-dragdrop-debug.js and b/mod/quiz/yui/build/moodle-mod_quiz-dragdrop/moodle-mod_quiz-dragdrop-debug.js differ
index 825813e..19c19ae 100644 (file)
Binary files a/mod/quiz/yui/build/moodle-mod_quiz-dragdrop/moodle-mod_quiz-dragdrop.js and b/mod/quiz/yui/build/moodle-mod_quiz-dragdrop/moodle-mod_quiz-dragdrop.js differ
index 8e3221b..1b26a9f 100644 (file)
Binary files a/mod/quiz/yui/build/moodle-mod_quiz-toolboxes/moodle-mod_quiz-toolboxes-debug.js and b/mod/quiz/yui/build/moodle-mod_quiz-toolboxes/moodle-mod_quiz-toolboxes-debug.js differ
index a766e4b..859fa0a 100644 (file)
Binary files a/mod/quiz/yui/build/moodle-mod_quiz-toolboxes/moodle-mod_quiz-toolboxes-min.js and b/mod/quiz/yui/build/moodle-mod_quiz-toolboxes/moodle-mod_quiz-toolboxes-min.js differ
index 8e3221b..1b26a9f 100644 (file)
Binary files a/mod/quiz/yui/build/moodle-mod_quiz-toolboxes/moodle-mod_quiz-toolboxes.js and b/mod/quiz/yui/build/moodle-mod_quiz-toolboxes/moodle-mod_quiz-toolboxes.js differ
index 66a404c..644f407 100644 (file)
Binary files a/mod/quiz/yui/build/moodle-mod_quiz-util-page/moodle-mod_quiz-util-page-debug.js and b/mod/quiz/yui/build/moodle-mod_quiz-util-page/moodle-mod_quiz-util-page-debug.js differ
index 66a404c..644f407 100644 (file)
Binary files a/mod/quiz/yui/build/moodle-mod_quiz-util-page/moodle-mod_quiz-util-page.js and b/mod/quiz/yui/build/moodle-mod_quiz-util-page/moodle-mod_quiz-util-page.js differ
index 39ed5de..f5ee89c 100644 (file)
@@ -1,3 +1,4 @@
+/* eslint-disable no-unused-vars */
 /**
  * Drag and Drop for Quiz sections and slots.
  *
index b213807..6585f71 100644 (file)
@@ -1,3 +1,4 @@
+/* global SELECTOR */
 /**
  * Resource drag and drop.
  *
index ec32959..a5ce6af 100644 (file)
@@ -1,3 +1,5 @@
+/* global TOOLBOX, BODY, SELECTOR */
+
 /**
  * Resource and activity toolbox class.
  *
@@ -245,12 +247,6 @@ Y.extend(RESOURCETOOLBOX, TOOLBOX, {
             instance.insert(editinstructions, 'before');
             anchor.replace(editform);
 
-            // Force the editing instruction to match the mod-indent position.
-            var padside = 'left';
-            if (window.right_to_left()) {
-                padside = 'right';
-            }
-
             // We hide various components whilst editing:
             activity.addClass(CSS.EDITINGMAXMARK);
 
index efbda57..ca34a3c 100644 (file)
@@ -1,3 +1,5 @@
+/* global TOOLBOX, BODY, SELECTOR */
+
 /**
  * Section toolbox class.
  *
index 4301ed2..b8b6b4b 100644 (file)
@@ -1,3 +1,4 @@
+/* eslint-disable no-unused-vars */
 /**
  * Resource and activity toolbox class.
  *
index a7469fc..4ad006a 100644 (file)
@@ -1,3 +1,5 @@
+/* global YUI */
+
 /**
  * A collection of utility classes for use with pages.
  *