Esanders has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289384

Change subject: Introduce stylelint
......................................................................

Introduce stylelint

Change-Id: I893049e87bb21f659f5b972143fc1cd4f8803107
---
M Gruntfile.js
M modules/ve.ui.CiteFromIdInspector.css
M modules/ve.ui.CiteFromIdInspectorTool.css
M modules/ve.ui.CitoidReferenceContextItem.css
M package.json
5 files changed, 21 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Citoid 
refs/changes/84/289384/1

diff --git a/Gruntfile.js b/Gruntfile.js
index 6dd072e..f66337f 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -8,10 +8,10 @@
 module.exports = function ( grunt ) {
        grunt.loadNpmTasks( 'grunt-jsonlint' );
        grunt.loadNpmTasks( 'grunt-banana-checker' );
-       grunt.loadNpmTasks( 'grunt-contrib-csslint' );
        grunt.loadNpmTasks( 'grunt-contrib-jshint' );
        grunt.loadNpmTasks( 'grunt-contrib-watch' );
        grunt.loadNpmTasks( 'grunt-jscs' );
+       grunt.loadNpmTasks( 'grunt-stylelint' );
 
        grunt.initConfig( {
                jshint: {
@@ -30,10 +30,16 @@
                },
                watch: {
                        files: [
-                               '.{csslintrc,jscsrc,jshintignore,jshintrc}',
+                               '.{stylelintrc,jscsrc,jshintignore,jshintrc}',
                                '<%= jshint.all %>'
                        ],
                        tasks: 'test'
+               },
+               stylelint: {
+                       src: [
+                               '**/*.css',
+                               '!node_modules/**'
+                       ]
                },
                jsonlint: {
                        all: [
@@ -43,6 +49,6 @@
                }
        } );
 
-       grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] 
);
+       grunt.registerTask( 'test', [ 'jshint', 'jscs', 'stylelint', 
'jsonlint', 'banana' ] );
        grunt.registerTask( 'default', 'test' );
 };
diff --git a/modules/ve.ui.CiteFromIdInspector.css 
b/modules/ve.ui.CiteFromIdInspector.css
index 545998d..9b998ed 100644
--- a/modules/ve.ui.CiteFromIdInspector.css
+++ b/modules/ve.ui.CiteFromIdInspector.css
@@ -14,18 +14,14 @@
        padding: 0.5em;
 }
 
-.ve-ui-citeFromIdInspector-preview + .ve-ui-citeFromIdInspector-preview {
-       border-top: 1px solid #cccccc;
-}
-
 .ve-ui-citeFromIdInspector-preview {
        max-height: 15em;
        padding: 0.5em;
        overflow-y: auto;
 }
 
-.ve-ui-citeFromIdReferenceWidget.oo-ui-labelElement .oo-ui-labelElement-label {
-       white-space: normal;
+.ve-ui-citeFromIdInspector-preview + .ve-ui-citeFromIdInspector-preview {
+       border-top: 1px solid #ccc;
 }
 
 .ve-ui-citeFromIdInspector-dialog-error,
@@ -33,7 +29,8 @@
        line-height: 1.5em;
 }
 
-.ve-ui-citeFromIdReferenceWidget .oo-ui-labelElement-label {
+.ve-ui-citeFromIdReferenceWidget.oo-ui-labelElement .oo-ui-labelElement-label {
+       white-space: normal;
        font-size: 1em;
        font-weight: bold;
 }
diff --git a/modules/ve.ui.CiteFromIdInspectorTool.css 
b/modules/ve.ui.CiteFromIdInspectorTool.css
index b7cc722..26e95fe 100644
--- a/modules/ve.ui.CiteFromIdInspectorTool.css
+++ b/modules/ve.ui.CiteFromIdInspectorTool.css
@@ -3,6 +3,6 @@
  */
 
 .oo-ui-tool-name-citefromid .oo-ui-popupWidget-body 
.ve-ui-educationPopup-header {
-       background: 
url(../../VisualEditor/modules/ve-mw/ui/styles/tools/images/reference-ltr.png) 
no-repeat center/90%;
+       background: url( 
../../VisualEditor/modules/ve-mw/ui/styles/tools/images/reference-ltr.png ) 
no-repeat center/90%;
        height: 150px;
 }
diff --git a/modules/ve.ui.CitoidReferenceContextItem.css 
b/modules/ve.ui.CitoidReferenceContextItem.css
index 78486a1..2532cd9 100644
--- a/modules/ve.ui.CitoidReferenceContextItem.css
+++ b/modules/ve.ui.CitoidReferenceContextItem.css
@@ -6,4 +6,4 @@
        border-top: 1px solid #ccc;
        margin: 1em 0 0 0;
        padding: 0.5em 0;
-}
\ No newline at end of file
+}
diff --git a/package.json b/package.json
index 5b1930f..e7fed52 100644
--- a/package.json
+++ b/package.json
@@ -10,13 +10,14 @@
   },
   "license": "MIT",
   "devDependencies": {
-    "grunt": "0.4.5",
-    "grunt-cli": "0.1.13",
-    "grunt-banana-checker": "0.4.0",
-    "grunt-contrib-csslint": "1.0.0",
+    "grunt": "1.0.1",
+    "grunt-banana-checker": "0.5.0",
+    "grunt-cli": "1.2.0",
     "grunt-contrib-jshint": "1.0.0",
     "grunt-contrib-watch": "1.0.0",
     "grunt-jscs": "2.8.0",
-    "grunt-jsonlint": "1.0.7"
+    "grunt-jsonlint": "1.0.7",
+    "grunt-stylelint": "0.2.0",
+    "stylelint-config-wikimedia": "0.1.0"
   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I893049e87bb21f659f5b972143fc1cd4f8803107
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Citoid
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>

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

Reply via email to