Merge branch 'MDL-55835-master' of git://github.com/danpoltawski/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 10 Oct 2016 23:21:14 +0000 (01:21 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 10 Oct 2016 23:21:14 +0000 (01:21 +0200)
.eslintrc
lib/amd/src/modal_factory.js
lib/amd/src/str.js
mod/lti/amd/src/contentitem.js
npm-shrinkwrap.json
package.json
theme/boost/amd/build/loader.min.js
theme/boost/amd/src/loader.js

index c701962..3514759 100644 (file)
--- a/.eslintrc
+++ b/.eslintrc
@@ -31,7 +31,6 @@
     'no-inner-declarations': 'error',
     'no-invalid-regexp': 'error',
     'no-irregular-whitespace': 'error',
-    'no-negated-in-lhs': 'error',
     'no-obj-calls': 'error',
     'no-prototype-builtins': 'off',
     'no-regex-spaces': 'error',
@@ -39,6 +38,7 @@
     'no-unexpected-multiline': 'error',
     'no-unreachable': 'warn',
     'no-unsafe-finally': 'error',
+    'no-unsafe-negation': 'error',
     'use-isnan': 'error',
     'valid-jsdoc': ['warn', { 'requireReturn': false, 'requireParamDescription': false, 'requireReturnDescription': false }],
     'valid-typeof': 'error',
@@ -63,6 +63,7 @@
     'no-extra-bind': 'warn',
     'no-fallthrough': 'error',
     'no-floating-decimal': 'warn',
+    'no-global-assign': 'warn',
     // Enabled by grunt for AMD modules: 'no-implicit-globals': 'error',
     'no-implied-eval': 'error',
     'no-invalid-this': 'error',
@@ -71,7 +72,6 @@
     'no-loop-func': 'error',
     'no-multi-spaces': 'warn',
     'no-multi-str': 'error',
-    'no-native-reassign': 'warn',
     'no-new-func': 'error',
     'no-new-wrappers': 'error',
     'no-octal': 'error',
@@ -96,7 +96,7 @@
     'no-delete-var': 'error',
     'no-undef': 'error',
     'no-undef-init': 'error',
-    'no-unused-vars': ['error', { 'caughtErrors': 'none', 'argsIgnorePattern': "(e|event)" }],
+    'no-unused-vars': ['error', { 'caughtErrors': 'none' }],
 
     // === Stylistic Issues ===
     'array-bracket-spacing': 'warn',
     'computed-property-spacing': 'error',
     'consistent-this': 'off',
     'eol-last': 'off',
+    'func-call-spacing': ['warn', 'never'],
     'func-names': 'off',
     'func-style': 'off',
     // indent currently not doing well with our wrapping style, so disabled.
     'no-nested-ternary': 'warn',
     'no-new-object': 'off',
     'no-plusplus': 'off',
-    'no-spaced-func': 'warn',
+    'no-tabs': 'error',
     'no-ternary': 'off',
     'no-trailing-spaces': 'error',
     'no-underscore-dangle': 'off',
     'spaced-comment': 'warn',
     'unicode-bom': 'error',
     'wrap-regex': 'off',
+
+    // === Deprecations ===
+    "no-restricted-properties": ['warn', {
+        'object': 'M',
+        'property': 'str',
+        'message': 'Use AMD module "core/str" or M.util.get_string()'
+    }],
   }
 }
index 7932c86..1bc7202 100644 (file)
@@ -77,8 +77,8 @@ define(['jquery', 'core/modal_events', 'core/modal', 'core/modal_save_cancel', '
      */
     var createFromElement = function(type, modalElement, triggerElement) {
         modalElement = $(modalElement);
-        var className = CLASSES[type];
-        var modal = new className(modalElement);
+        var ClassName = CLASSES[type];
+        var modal = new ClassName(modalElement);
         setUpTrigger(modal, triggerElement);
 
         return modal;
index 317d6d4..ad14a0a 100644 (file)
@@ -24,6 +24,8 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  * @since      2.9
  */
+// Disable no-restriced-properties because M.str is expected here:
+/* eslint-disable no-restricted-properties */
 define(['jquery', 'core/ajax', 'core/localstorage'], function($, ajax, storage) {
 
 
index f8e2634..42e9808 100644 (file)
@@ -72,7 +72,7 @@ define(
                             dialogue.show();
 
                             // On hide handler.
-                            modal.getRoot().on(ModalEvents.hidden, function () {
+                            modal.getRoot().on(ModalEvents.hidden, function() {
                                 // Empty modal contents when it's hidden.
                                 modal.setBody('');
 
index 90f456d..caee97a 100644 (file)
@@ -7,14 +7,21 @@
       "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz"
     },
     "acorn": {
-      "version": "3.2.0",
-      "from": "https://registry.npmjs.org/acorn/-/acorn-3.2.0.tgz",
-      "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.2.0.tgz"
+      "version": "4.0.3",
+      "from": "acorn@>=4.0.1 <5.0.0",
+      "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.3.tgz"
     },
     "acorn-jsx": {
       "version": "3.0.1",
       "from": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz",
-      "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz"
+      "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz",
+      "dependencies": {
+        "acorn": {
+          "version": "3.3.0",
+          "from": "acorn@>=3.0.4 <4.0.0",
+          "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz"
+        }
+      }
     },
     "align-text": {
       "version": "0.1.4",
       "from": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
       "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz"
     },
+    "circular-json": {
+      "version": "0.3.1",
+      "from": "circular-json@>=0.3.0 <0.4.0",
+      "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.1.tgz"
+    },
     "cli": {
       "version": "0.6.6",
       "from": "https://registry.npmjs.org/cli/-/cli-0.6.6.tgz",
       "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz"
     },
     "del": {
-      "version": "2.2.1",
-      "from": "https://registry.npmjs.org/del/-/del-2.2.1.tgz",
-      "resolved": "https://registry.npmjs.org/del/-/del-2.2.1.tgz"
+      "version": "2.2.2",
+      "from": "del@>=2.0.2 <3.0.0",
+      "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz"
     },
     "delayed-stream": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz"
     },
     "doctrine": {
-      "version": "1.2.2",
-      "from": "https://registry.npmjs.org/doctrine/-/doctrine-1.2.2.tgz",
-      "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.2.2.tgz",
-      "dependencies": {
-        "esutils": {
-          "version": "1.1.6",
-          "from": "https://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz",
-          "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz"
-        }
-      }
+      "version": "1.4.0",
+      "from": "doctrine@>=1.2.2 <2.0.0",
+      "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.4.0.tgz"
     },
     "doiuse": {
       "version": "2.4.1",
       "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz"
     },
     "eslint": {
-      "version": "3.0.1",
-      "from": "https://registry.npmjs.org/eslint/-/eslint-3.0.1.tgz",
-      "resolved": "https://registry.npmjs.org/eslint/-/eslint-3.0.1.tgz"
+      "version": "3.7.1",
+      "from": "eslint@3.7.1",
+      "resolved": "https://registry.npmjs.org/eslint/-/eslint-3.7.1.tgz",
+      "dependencies": {
+        "ignore": {
+          "version": "3.1.5",
+          "from": "ignore@>=3.1.5 <4.0.0",
+          "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.1.5.tgz"
+        }
+      }
     },
     "espree": {
-      "version": "3.1.6",
-      "from": "https://registry.npmjs.org/espree/-/espree-3.1.6.tgz",
-      "resolved": "https://registry.npmjs.org/espree/-/espree-3.1.6.tgz"
+      "version": "3.3.2",
+      "from": "espree@>=3.2.0 <4.0.0",
+      "resolved": "https://registry.npmjs.org/espree/-/espree-3.3.2.tgz"
     },
     "esprima": {
       "version": "2.7.2",
       "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz"
     },
     "fast-levenshtein": {
-      "version": "1.1.3",
-      "from": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.3.tgz",
-      "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.3.tgz"
+      "version": "2.0.5",
+      "from": "fast-levenshtein@>=2.0.4 <2.1.0",
+      "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.5.tgz"
     },
     "faye-websocket": {
       "version": "0.10.0",
       "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz"
     },
     "file-entry-cache": {
-      "version": "1.2.4",
-      "from": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.2.4.tgz",
-      "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.2.4.tgz"
+      "version": "2.0.0",
+      "from": "file-entry-cache@>=2.0.0 <3.0.0",
+      "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz"
     },
     "fileset": {
       "version": "0.1.8",
       }
     },
     "flat-cache": {
-      "version": "1.0.10",
-      "from": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.0.10.tgz",
-      "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.0.10.tgz"
+      "version": "1.2.1",
+      "from": "flat-cache@>=1.2.1 <2.0.0",
+      "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.2.1.tgz"
     },
     "flatten": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.5.tgz"
     },
     "globals": {
-      "version": "9.9.0",
-      "from": "https://registry.npmjs.org/globals/-/globals-9.9.0.tgz",
-      "resolved": "https://registry.npmjs.org/globals/-/globals-9.9.0.tgz"
+      "version": "9.10.0",
+      "from": "globals@>=9.2.0 <10.0.0",
+      "resolved": "https://registry.npmjs.org/globals/-/globals-9.10.0.tgz"
     },
     "globby": {
       "version": "5.0.0",
       "from": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz",
       "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz"
     },
+    "natural-compare": {
+      "version": "1.4.0",
+      "from": "natural-compare@>=1.4.0 <2.0.0",
+      "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz"
+    },
     "node-uuid": {
       "version": "1.4.7",
       "from": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz",
       }
     },
     "optionator": {
-      "version": "0.8.1",
-      "from": "https://registry.npmjs.org/optionator/-/optionator-0.8.1.tgz",
-      "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.1.tgz"
+      "version": "0.8.2",
+      "from": "optionator@>=0.8.1 <0.9.0",
+      "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz"
     },
     "os-homedir": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz"
     },
     "path-is-inside": {
-      "version": "1.0.1",
-      "from": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.1.tgz",
-      "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.1.tgz"
+      "version": "1.0.2",
+      "from": "path-is-inside@>=1.0.1 <2.0.0",
+      "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz"
     },
     "path-type": {
       "version": "1.1.0",
       "from": "https://registry.npmjs.org/read-file-stdin/-/read-file-stdin-0.2.1.tgz",
       "resolved": "https://registry.npmjs.org/read-file-stdin/-/read-file-stdin-0.2.1.tgz"
     },
-    "read-json-sync": {
-      "version": "1.1.1",
-      "from": "https://registry.npmjs.org/read-json-sync/-/read-json-sync-1.1.1.tgz",
-      "resolved": "https://registry.npmjs.org/read-json-sync/-/read-json-sync-1.1.1.tgz"
-    },
     "read-pkg": {
       "version": "1.1.0",
       "from": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
       "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz"
     },
     "shelljs": {
-      "version": "0.6.0",
-      "from": "https://registry.npmjs.org/shelljs/-/shelljs-0.6.0.tgz",
-      "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.6.0.tgz"
+      "version": "0.6.1",
+      "from": "shelljs@>=0.6.0 <0.7.0",
+      "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.6.1.tgz"
     },
     "shifter": {
       "version": "0.5.0",
index 072b261..0553787 100644 (file)
@@ -4,7 +4,7 @@
   "description": "Moodle",
   "devDependencies": {
     "async": "1.5.2",
-    "eslint": "^3.0.1",
+    "eslint": "3.7.1",
     "grunt": "1.0.1",
     "grunt-contrib-less": "1.3.0",
     "grunt-contrib-uglify": "1.0.1",
index 30a4ec2..04bc6a9 100644 (file)
Binary files a/theme/boost/amd/build/loader.min.js and b/theme/boost/amd/build/loader.min.js differ
index 25665b4..99bce70 100644 (file)
@@ -39,7 +39,7 @@ define(['jquery', './tether'], function(jQuery, Tether) {
             'theme_boost/tab',
             'theme_boost/tooltip',
             'theme_boost/popover'],
-            function(another) {
+            function() {
         jQuery('[data-toggle="popover"]').popover();
     });