MDL-52127 grunt: add .eslingingore file, keep task
authorDan Poltawski <dan@moodle.com>
Wed, 15 Jun 2016 14:50:46 +0000 (15:50 +0100)
committerDan Poltawski <dan@moodle.com>
Wed, 15 Jun 2016 14:52:34 +0000 (15:52 +0100)
Eloy prefers we keep the ignorefiles grunt task

.eslintignore [new file with mode: 0644]
.gitignore
Gruntfile.js

diff --git a/.eslintignore b/.eslintignore
new file mode 100644 (file)
index 0000000..4c89fdb
--- /dev/null
@@ -0,0 +1,57 @@
+# Generated by "grunt ignorefiles"
+*/**/yui/src/*/meta/
+*/**/build/
+node_modules/
+vendor/
+auth/cas/CAS/
+auth/fc/fcFPP.php
+enrol/lti/ims-blti/
+filter/algebra/AlgParser.pm
+filter/tex/mimetex.*
+lib/editor/atto/yui/src/rangy/js/*.*
+lib/editor/tinymce/plugins/pdw/tinymce/
+lib/editor/tinymce/plugins/spellchecker/rpc.php
+lib/editor/tinymce/tiny_mce/
+lib/adodb/
+lib/alfresco/
+lib/bennu/
+lib/evalmath/
+lib/lessphp/
+lib/phpexcel/
+lib/pear/Net/
+lib/google/
+lib/htmlpurifier/
+lib/jabber/
+lib/minify/
+lib/flowplayer/
+lib/password_compat/
+lib/pear/Auth/RADIUS.php
+lib/pear/Crypt/CHAP.php
+lib/pear/HTML/Common.php
+lib/pear/HTML/QuickForm.php
+lib/pear/HTML/QuickForm/
+lib/pear/PEAR.php
+lib/phpmailer/
+lib/simplepie/
+lib/tcpdf/
+lib/typo3/
+lib/yuilib/
+lib/yuilib/gallery/
+lib/jquery/
+lib/html2text/
+lib/markdown/
+lib/recaptchalib.php
+lib/xhprof/
+lib/xmlize.php
+lib/horde/
+lib/requirejs/
+lib/amd/src/loglevel.js
+lib/mustache/
+lib/amd/src/mustache.js
+lib/graphlib.php
+lib/spout/
+mod/assign/feedback/editpdf/fpdi/
+repository/s3/S3.php
+theme/bootstrapbase/less/bootstrap/
+theme/bootstrapbase/javascript/html5shiv.js
+theme/bootstrapbase/amd/src/bootstrap.js
\ No newline at end of file
index 71a7224..1dab0f7 100644 (file)
@@ -36,4 +36,3 @@ composer.phar
 /lib/yuilib/*/*/*-coverage.js
 atlassian-ide-plugin.xml
 /node_modules/
-.eslintignore
index a1d525e..b728341 100644 (file)
@@ -98,22 +98,6 @@ module.exports = function(grunt) {
         return libs;
     };
 
-    // An array of paths to third party directories.
-    var thirdPartyPaths = getThirdPartyPathsFromXML();
-
-    /**
-     * Determine if the file is a Moodle file, or its listed in
-     * the thirdpartylibs.xml file paths as a third party file.
-     *
-     * @param {string} file The file path to determine if thirdparty
-     * @return {bool} false If thid party file.
-     */
-    var isMoodleFile = function(file) {
-      if (grunt.file.isMatch(thirdPartyPaths, file)) {
-        return false;
-      }
-      return true;
-    };
 
     // Project configuration.
     grunt.initConfig({
@@ -129,7 +113,6 @@ module.exports = function(grunt) {
             // to YUI rollups.
             amd: {
               src: amdSrc,
-              filter: isMoodleFile,
               options: {
                   rules: {'no-undef': 'error', 'no-unused-vars': 'error', 'no-empty': 'error', 'no-unused-expressions': 'error'}
               }
@@ -137,7 +120,6 @@ module.exports = function(grunt) {
             // Check YUI module source files.
             yui: {
                src: ['**/yui/src/**/*.js', '!*/**/yui/src/*/meta/*.js'],
-               filter: isMoodleFile
             }
         },
         uglify: {
@@ -189,6 +171,8 @@ module.exports = function(grunt) {
      * Generate ignore files (utilising thirdpartylibs.xml data)
      */
     tasks.ignorefiles = function() {
+      // An array of paths to third party directories.
+      var thirdPartyPaths = getThirdPartyPathsFromXML();
       // Generate .eslintignore.
       var eslintIgnores = ['# Generated by "grunt ignorefiles"', '*/**/yui/src/*/meta/', '*/**/build/'].concat(thirdPartyPaths);
       grunt.file.write('.eslintignore', eslintIgnores.join('\n'));