Skip to content

Commit f873122

Browse files
committed
MDL-52127 grunt: add .eslingingore file, keep task
Eloy prefers we keep the ignorefiles grunt task
1 parent b18478b commit f873122

File tree

3 files changed

+59
-19
lines changed

3 files changed

+59
-19
lines changed

.eslintignore

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Generated by "grunt ignorefiles"
2+
*/**/yui/src/*/meta/
3+
*/**/build/
4+
node_modules/
5+
vendor/
6+
auth/cas/CAS/
7+
auth/fc/fcFPP.php
8+
enrol/lti/ims-blti/
9+
filter/algebra/AlgParser.pm
10+
filter/tex/mimetex.*
11+
lib/editor/atto/yui/src/rangy/js/*.*
12+
lib/editor/tinymce/plugins/pdw/tinymce/
13+
lib/editor/tinymce/plugins/spellchecker/rpc.php
14+
lib/editor/tinymce/tiny_mce/
15+
lib/adodb/
16+
lib/alfresco/
17+
lib/bennu/
18+
lib/evalmath/
19+
lib/lessphp/
20+
lib/phpexcel/
21+
lib/pear/Net/
22+
lib/google/
23+
lib/htmlpurifier/
24+
lib/jabber/
25+
lib/minify/
26+
lib/flowplayer/
27+
lib/password_compat/
28+
lib/pear/Auth/RADIUS.php
29+
lib/pear/Crypt/CHAP.php
30+
lib/pear/HTML/Common.php
31+
lib/pear/HTML/QuickForm.php
32+
lib/pear/HTML/QuickForm/
33+
lib/pear/PEAR.php
34+
lib/phpmailer/
35+
lib/simplepie/
36+
lib/tcpdf/
37+
lib/typo3/
38+
lib/yuilib/
39+
lib/yuilib/gallery/
40+
lib/jquery/
41+
lib/html2text/
42+
lib/markdown/
43+
lib/recaptchalib.php
44+
lib/xhprof/
45+
lib/xmlize.php
46+
lib/horde/
47+
lib/requirejs/
48+
lib/amd/src/loglevel.js
49+
lib/mustache/
50+
lib/amd/src/mustache.js
51+
lib/graphlib.php
52+
lib/spout/
53+
mod/assign/feedback/editpdf/fpdi/
54+
repository/s3/S3.php
55+
theme/bootstrapbase/less/bootstrap/
56+
theme/bootstrapbase/javascript/html5shiv.js
57+
theme/bootstrapbase/amd/src/bootstrap.js

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,3 @@ composer.phar
3636
/lib/yuilib/*/*/*-coverage.js
3737
atlassian-ide-plugin.xml
3838
/node_modules/
39-
.eslintignore

Gruntfile.js

+2-18
Original file line numberDiff line numberDiff line change
@@ -98,22 +98,6 @@ module.exports = function(grunt) {
9898
return libs;
9999
};
100100

101-
// An array of paths to third party directories.
102-
var thirdPartyPaths = getThirdPartyPathsFromXML();
103-
104-
/**
105-
* Determine if the file is a Moodle file, or its listed in
106-
* the thirdpartylibs.xml file paths as a third party file.
107-
*
108-
* @param {string} file The file path to determine if thirdparty
109-
* @return {bool} false If thid party file.
110-
*/
111-
var isMoodleFile = function(file) {
112-
if (grunt.file.isMatch(thirdPartyPaths, file)) {
113-
return false;
114-
}
115-
return true;
116-
};
117101

118102
// Project configuration.
119103
grunt.initConfig({
@@ -129,15 +113,13 @@ module.exports = function(grunt) {
129113
// to YUI rollups.
130114
amd: {
131115
src: amdSrc,
132-
filter: isMoodleFile,
133116
options: {
134117
rules: {'no-undef': 'error', 'no-unused-vars': 'error', 'no-empty': 'error', 'no-unused-expressions': 'error'}
135118
}
136119
},
137120
// Check YUI module source files.
138121
yui: {
139122
src: ['**/yui/src/**/*.js', '!*/**/yui/src/*/meta/*.js'],
140-
filter: isMoodleFile
141123
}
142124
},
143125
uglify: {
@@ -189,6 +171,8 @@ module.exports = function(grunt) {
189171
* Generate ignore files (utilising thirdpartylibs.xml data)
190172
*/
191173
tasks.ignorefiles = function() {
174+
// An array of paths to third party directories.
175+
var thirdPartyPaths = getThirdPartyPathsFromXML();
192176
// Generate .eslintignore.
193177
var eslintIgnores = ['# Generated by "grunt ignorefiles"', '*/**/yui/src/*/meta/', '*/**/build/'].concat(thirdPartyPaths);
194178
grunt.file.write('.eslintignore', eslintIgnores.join('\n'));

0 commit comments

Comments
 (0)