jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/353031 )

Change subject: Disable JSCS rule to disallow space after "function ()" keyword
......................................................................


Disable JSCS rule to disallow space after "function ()" keyword

All other code repositories we have either enforce the space in
"function ()", or make it optional. It does not make sense to have
some code repositories *disallow" this space. This is confusing.

Change-Id: Ib034a04b2365f696435a90131fc5d5cbc7d1e3fa
---
M .jscsrc
M Gruntfile.js
2 files changed, 21 insertions(+), 13 deletions(-)

Approvals:
  Addshore: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.jscsrc b/.jscsrc
index d5686a2..f2434d4 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -5,16 +5,20 @@
        // ----
        // Own rules
 
-       "disallowSpaceAfterKeywords": [
-               "catch",
-               "for",
-//             "if",
-               "switch",
-               "while"
-       ],
        "requireSpaceAfterKeywords": [
-               "else"
-       ],
-
-       "excludeFiles": [ "node_modules/**", "vendor/**" ]
+               "do",
+               // TODO: Enable for "for".
+               // TODO: Enable for "if".
+               "else",
+               "switch",
+               "case",
+               "try",
+               "catch",
+               "void",
+               "while",
+               "with",
+               "return",
+               "typeof"
+               // TODO: Enable for "function".
+       ]
 }
diff --git a/Gruntfile.js b/Gruntfile.js
index 57113a7..c160c4d 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -11,10 +11,14 @@
                        options: {
                                jshintrc: true
                        },
-                       all: '.'
+                       all: [
+                               '**/*.js',
+                               '!node_modules/**',
+                               '!vendor/**'
+                       ]
                },
                jscs: {
-                       all: '.'
+                       src: '<%= jshint.all %>'
                },
                banana: {
                        options: {

-- 
To view, visit https://gerrit.wikimedia.org/r/353031
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib034a04b2365f696435a90131fc5d5cbc7d1e3fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to