[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Introduce stylelint

2016-10-04 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Introduce stylelint
..


Introduce stylelint

Introducing stylelint with configuration rules compliant to
Wikimedia CSS Coding Standards 'stylelint-config-wikimedia', nullifying
some for now and making majority pass.

Change-Id: I2c4acee41c9b56d9b00e2a2c5b7ab0ab5de454ce
---
A .stylelintrc
M Gruntfile.js
M modules/echo.variables.less
M modules/nojs/mw.echo.alert.less
M modules/nojs/mw.echo.alert.monobook.less
M modules/nojs/mw.echo.badge.less
M modules/nojs/mw.echo.notifications.less
M modules/nojs/mw.echo.special.less
M modules/styles/mw.echo.ui.ConfirmationPopupWidget.less
M modules/styles/mw.echo.ui.CrossWikiNotificationItemWidget.less
M modules/styles/mw.echo.ui.DatedSubGroupListWidget.less
M modules/styles/mw.echo.ui.FooterNoticeWidget.less
M modules/styles/mw.echo.ui.MenuItemWidget.less
M modules/styles/mw.echo.ui.NotificationBadgeWidget.less
M modules/styles/mw.echo.ui.NotificationBadgeWidget.modern.less
M modules/styles/mw.echo.ui.NotificationBadgeWidget.monobook.less
M modules/styles/mw.echo.ui.NotificationItemWidget.less
M modules/styles/mw.echo.ui.NotificationItemWidget.modern.less
M modules/styles/mw.echo.ui.NotificationsListWidget.less
M modules/styles/mw.echo.ui.SpecialHelpMenuWidget.less
M package.json
21 files changed, 92 insertions(+), 68 deletions(-)

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



diff --git a/.stylelintrc b/.stylelintrc
new file mode 100644
index 000..c0e9c2f
--- /dev/null
+++ b/.stylelintrc
@@ -0,0 +1,9 @@
+{
+   "extends": "stylelint-config-wikimedia",
+   "rules": {
+   "declaration-no-important": null,
+   "no-descending-specificity": null,
+   "selector-no-id": null,
+   "selector-no-vendor-prefix": null
+   }
+}
diff --git a/Gruntfile.js b/Gruntfile.js
index 6d8b3ed..1399e78 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -5,6 +5,7 @@
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jscs' );
+   grunt.loadNpmTasks( 'grunt-stylelint' );
 
grunt.initConfig( {
jshint: {
@@ -27,6 +28,16 @@
'!docs/**'
]
},
+   // Lint – Styling
+   stylelint: {
+   options: {
+   syntax: 'less'
+   },
+   all: [
+   'modules/**/*.css',
+   'modules/**/*.less'
+   ]
+   },
banana: {
all: 'i18n/'
},
@@ -47,7 +58,7 @@
}
} );
 
-   grunt.registerTask( 'lint', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] 
);
+   grunt.registerTask( 'lint', [ 'jshint', 'jscs', 'stylelint', 
'jsonlint', 'banana' ] );
grunt.registerTask( 'test', 'lint' );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/modules/echo.variables.less b/modules/echo.variables.less
index f70cf4e..a24ba39 100644
--- a/modules/echo.variables.less
+++ b/modules/echo.variables.less
@@ -3,10 +3,10 @@
 @badge-distance-adjustment: 1em;
 
 @notification-background-unseen: #dce8ff;
-@notification-background-unread: white;
+@notification-background-unread: #fff;
 @notification-background-read: #f1f1f1;
 
-@badge-counter-background-seen: #71777D;
+@badge-counter-background-seen: #71777d;
 @badge-counter-background-unseen-alert: #c33;
 @badge-counter-background-unseen-message: #36c;
 
diff --git a/modules/nojs/mw.echo.alert.less b/modules/nojs/mw.echo.alert.less
index ca83eae..2603398 100644
--- a/modules/nojs/mw.echo.alert.less
+++ b/modules/nojs/mw.echo.alert.less
@@ -1,7 +1,7 @@
 .mw-echo-alert {
border-radius: 2px;
-   background-color: #F9C557;
+   background-color: #f9c557;
padding: 0.25em 0.8em 0.2em 0.8em;
-   color: #55;
+   color: #555;
font-weight: normal;
 }
diff --git a/modules/nojs/mw.echo.alert.monobook.less 
b/modules/nojs/mw.echo.alert.monobook.less
index f1cfd05..95db1c0 100644
--- a/modules/nojs/mw.echo.alert.monobook.less
+++ b/modules/nojs/mw.echo.alert.monobook.less
@@ -1,3 +1,3 @@
 #pt-mytalk a.mw-echo-alert:hover {
-   background-color: #FAB951;
+   background-color: #fab951;
 }
diff --git a/modules/nojs/mw.echo.badge.less b/modules/nojs/mw.echo.badge.less
index 404a45d..df6c29f 100644
--- a/modules/nojs/mw.echo.badge.less
+++ b/modules/nojs/mw.echo.badge.less
@@ -50,17 +50,17 @@
font-size: 0.9em;
font-weight: bold;
padding: 0 0.3em;
-   border: 1px solid white;
+   border: 1px solid #fff;
border-radius: 2px;

[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Introduce stylelint

2016-10-04 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review.

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

Change subject: Introduce stylelint
..

Introduce stylelint

Introducing stylelint with configuration rules compliant to
Wikimedia CSS Coding Standards 'stylelint-config-wikimedia', nullifying
some for now and making majority pass.

Change-Id: I2c4acee41c9b56d9b00e2a2c5b7ab0ab5de454ce
---
A .stylelintrc
M Gruntfile.js
M modules/echo.variables.less
M modules/nojs/mw.echo.alert.less
M modules/nojs/mw.echo.alert.monobook.less
M modules/nojs/mw.echo.badge.less
M modules/nojs/mw.echo.notifications.less
M modules/nojs/mw.echo.special.less
M modules/styles/mw.echo.ui.ConfirmationPopupWidget.less
M modules/styles/mw.echo.ui.CrossWikiNotificationItemWidget.less
M modules/styles/mw.echo.ui.DatedSubGroupListWidget.less
M modules/styles/mw.echo.ui.FooterNoticeWidget.less
M modules/styles/mw.echo.ui.MenuItemWidget.less
M modules/styles/mw.echo.ui.NotificationBadgeWidget.less
M modules/styles/mw.echo.ui.NotificationBadgeWidget.modern.less
M modules/styles/mw.echo.ui.NotificationBadgeWidget.monobook.less
M modules/styles/mw.echo.ui.NotificationItemWidget.less
M modules/styles/mw.echo.ui.NotificationItemWidget.modern.less
M modules/styles/mw.echo.ui.NotificationsListWidget.less
M modules/styles/mw.echo.ui.SpecialHelpMenuWidget.less
M package.json
21 files changed, 92 insertions(+), 68 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/14/314214/1

diff --git a/.stylelintrc b/.stylelintrc
new file mode 100644
index 000..c0e9c2f
--- /dev/null
+++ b/.stylelintrc
@@ -0,0 +1,9 @@
+{
+   "extends": "stylelint-config-wikimedia",
+   "rules": {
+   "declaration-no-important": null,
+   "no-descending-specificity": null,
+   "selector-no-id": null,
+   "selector-no-vendor-prefix": null
+   }
+}
diff --git a/Gruntfile.js b/Gruntfile.js
index 6d8b3ed..1399e78 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -5,6 +5,7 @@
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jscs' );
+   grunt.loadNpmTasks( 'grunt-stylelint' );
 
grunt.initConfig( {
jshint: {
@@ -27,6 +28,16 @@
'!docs/**'
]
},
+   // Lint – Styling
+   stylelint: {
+   options: {
+   syntax: 'less'
+   },
+   all: [
+   'modules/**/*.css',
+   'modules/**/*.less'
+   ]
+   },
banana: {
all: 'i18n/'
},
@@ -47,7 +58,7 @@
}
} );
 
-   grunt.registerTask( 'lint', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] 
);
+   grunt.registerTask( 'lint', [ 'jshint', 'jscs', 'stylelint', 
'jsonlint', 'banana' ] );
grunt.registerTask( 'test', 'lint' );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/modules/echo.variables.less b/modules/echo.variables.less
index f70cf4e..a24ba39 100644
--- a/modules/echo.variables.less
+++ b/modules/echo.variables.less
@@ -3,10 +3,10 @@
 @badge-distance-adjustment: 1em;
 
 @notification-background-unseen: #dce8ff;
-@notification-background-unread: white;
+@notification-background-unread: #fff;
 @notification-background-read: #f1f1f1;
 
-@badge-counter-background-seen: #71777D;
+@badge-counter-background-seen: #71777d;
 @badge-counter-background-unseen-alert: #c33;
 @badge-counter-background-unseen-message: #36c;
 
diff --git a/modules/nojs/mw.echo.alert.less b/modules/nojs/mw.echo.alert.less
index ca83eae..2603398 100644
--- a/modules/nojs/mw.echo.alert.less
+++ b/modules/nojs/mw.echo.alert.less
@@ -1,7 +1,7 @@
 .mw-echo-alert {
border-radius: 2px;
-   background-color: #F9C557;
+   background-color: #f9c557;
padding: 0.25em 0.8em 0.2em 0.8em;
-   color: #55;
+   color: #555;
font-weight: normal;
 }
diff --git a/modules/nojs/mw.echo.alert.monobook.less 
b/modules/nojs/mw.echo.alert.monobook.less
index f1cfd05..95db1c0 100644
--- a/modules/nojs/mw.echo.alert.monobook.less
+++ b/modules/nojs/mw.echo.alert.monobook.less
@@ -1,3 +1,3 @@
 #pt-mytalk a.mw-echo-alert:hover {
-   background-color: #FAB951;
+   background-color: #fab951;
 }
diff --git a/modules/nojs/mw.echo.badge.less b/modules/nojs/mw.echo.badge.less
index 404a45d..df6c29f 100644
--- a/modules/nojs/mw.echo.badge.less
+++ b/modules/nojs/mw.echo.badge.less
@@ -50,17 +50,17 @@
font-size: 0.9em;
font-weight: bold;
padding: 0 0.3em;
-   border: 1px solid white;
+   border: 1px solid #fff;