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

Change subject: Add stylelint for css files
......................................................................


Add stylelint for css files

Fixed the following rules:
- indentation
- color-named
- color-hex-length
- block-opening-brace-newline

Change-Id: I36c8d1656f5f106b4a96c752370f6da52b10cffe
---
A .stylelintrc
M Gruntfile.js
M modules/css/ext.PerformanceInspector.css
M modules/css/ext.PerformanceInspector.noscript.css
M package.json
5 files changed, 57 insertions(+), 41 deletions(-)

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



diff --git a/.stylelintrc b/.stylelintrc
new file mode 100644
index 0000000..2c90730
--- /dev/null
+++ b/.stylelintrc
@@ -0,0 +1,3 @@
+{
+       "extends": "stylelint-config-wikimedia"
+}
diff --git a/Gruntfile.js b/Gruntfile.js
index be270bd..491c3d0 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -5,6 +5,7 @@
        grunt.loadNpmTasks( 'grunt-banana-checker' );
        grunt.loadNpmTasks( 'grunt-eslint' );
        grunt.loadNpmTasks( 'grunt-jsonlint' );
+       grunt.loadNpmTasks( 'grunt-stylelint' );
 
        grunt.initConfig( {
                eslint: {
@@ -17,11 +18,18 @@
                jsonlint: {
                        all: [
                                '**/*.json',
+                               '.stylelintrc',
+                               '!node_modules/**'
+                       ]
+               },
+               stylelint: {
+                       all: [
+                               '**/*.css',
                                '!node_modules/**'
                        ]
                }
        } );
 
-       grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'banana' ] );
+       grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'banana', 
'stylelint' ] );
        grunt.registerTask( 'default', 'test' );
 };
diff --git a/modules/css/ext.PerformanceInspector.css 
b/modules/css/ext.PerformanceInspector.css
index 0eca3f9..a8d8b82 100644
--- a/modules/css/ext.PerformanceInspector.css
+++ b/modules/css/ext.PerformanceInspector.css
@@ -1,71 +1,71 @@
 .barchart {
-    color: white;
-    font-size: 14px;
+       color: #fff;
+       font-size: 14px;
 }
 .barchart .row {
-    position: relative;
-    min-height: 26px;
-    margin-bottom: 2px;
-    padding: 0 10px;
-    background: #999999;
-    overflow: hidden;
+       position: relative;
+       min-height: 26px;
+       margin-bottom: 2px;
+       padding: 0 10px;
+       background: #999;
+       overflow: hidden;
 }
 .barchart .barWrap .bar {
-    position: absolute;
-    top: 0;
-    left: 0;
-    height: 100%;
-    background: #006496;
+       position: absolute;
+       top: 0;
+       left: 0;
+       height: 100%;
+       background: #006496;
 }
 .barchart .label {
-    position: relative;
-    font-size: 12px;
-    line-height: 26px;
-    font-weight: bold;
-    float: left;
+       position: relative;
+       font-size: 12px;
+       line-height: 26px;
+       font-weight: bold;
+       float: left;
 }
 .barchart .value {
-    position: relative;
-    font-size: 14px;
-    line-height: 26px;
-    font-weight: bold;
-    float: right;
+       position: relative;
+       font-size: 14px;
+       line-height: 26px;
+       font-weight: bold;
+       float: right;
 }
 .hidden {
-    display: none;
+       display: none;
 }
 
 .url {
-    max-width: 200px;
-    word-break: break-all;
+       max-width: 200px;
+       word-break: break-all;
 }
 
 .mw-pi-url-crop {
-    display: inline-block;
-    max-width: 200px;
-    overflow: hidden;
-    white-space: nowrap;
-    text-overflow: ellipsis;
-    vertical-align: middle;
+       display: inline-block;
+       max-width: 200px;
+       overflow: hidden;
+       white-space: nowrap;
+       text-overflow: ellipsis;
+       vertical-align: middle;
 }
 
 table.mw-pi-inspector {
-  vertical-align: middle;
-  text-align: left;
-  width: 100%;
+       vertical-align: middle;
+       text-align: left;
+       width: 100%;
 }
 
 table.mw-pi-inspector > tr > th,
 table.mw-pi-inspector > tr > td,
 table.mw-pi-inspector * > tr > th,
 table.mw-pi-inspector > * > tr > td {
-    padding: 0.5em;
+       padding: 0.5em;
 }
 
 td.mw-pi-details {
-  vertical-align: top;
+       vertical-align: top;
 }
 
 td.mw-pi-center {
-  text-align: center;
+       text-align: center;
 }
diff --git a/modules/css/ext.PerformanceInspector.noscript.css 
b/modules/css/ext.PerformanceInspector.noscript.css
index ad08fda..1c6aa00 100644
--- a/modules/css/ext.PerformanceInspector.noscript.css
+++ b/modules/css/ext.PerformanceInspector.noscript.css
@@ -1 +1,4 @@
-.client-nojs #t-performanceinspector { display: none; }
+/* stylelint-disable-next-line selector-no-id */
+.client-nojs #t-performanceinspector {
+       display: none;
+}
diff --git a/package.json b/package.json
index d6a0fe0..d39448c 100644
--- a/package.json
+++ b/package.json
@@ -7,6 +7,8 @@
                "grunt": "1.0.1",
                "grunt-banana-checker": "0.5.0",
                "grunt-eslint": "19.0.0",
-               "grunt-jsonlint": "1.0.8"
+               "grunt-jsonlint": "1.0.8",
+               "grunt-stylelint": "0.7.0",
+               "stylelint-config-wikimedia": "0.4.1"
        }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I36c8d1656f5f106b4a96c752370f6da52b10cffe
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/PerformanceInspector
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to