Esanders has uploaded a new change for review.

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

Change subject: Replace csslint with stylelint
......................................................................

Replace csslint with stylelint

For now just use the rules file in lib/ve, but eventually
this will be a preset.

Change-Id: I7fd79d3e1dce37aef066d416cd969e5fff1e962f
Depends-On: I17e0d23ddfedf64985495ab35d113ea08c03b1df
---
M Gruntfile.js
M modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-monobook.css
M modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-vector.css
M modules/ve-mw/init/styles/ve.init.mw.DesktopTarget-monobook.css
M modules/ve-mw/init/styles/ve.init.mw.MobileArticleTarget.css
M modules/ve-mw/ui/styles/dialogs/ve.ui.MWMetaDialog.css
M modules/ve-mw/ui/styles/pages/ve.ui.MWCategoriesPage.css
M modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css
M modules/ve-mw/ui/styles/tools/ve.ui.MWLinkInspectorTool.css
M modules/ve-mw/ui/styles/widgets/ve.ui.MWAceEditorWidget.css
M modules/ve-mw/ui/styles/widgets/ve.ui.MWMediaInfoFieldWidget.css
M modules/ve-mw/ui/styles/widgets/ve.ui.MWMediaResultWidget.css
M modules/ve-mw/ui/styles/widgets/ve.ui.MWTocWidget.css
M modules/ve-mw/ui/themes/vector/ve.ui.MWFormatTool.css
M package.json
15 files changed, 55 insertions(+), 50 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/53/288953/1

diff --git a/Gruntfile.js b/Gruntfile.js
index c7e2dff..cf9a642 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -9,7 +9,6 @@
        var modules = grunt.file.readJSON( 'lib/ve/build/modules.json' );
 
        grunt.loadNpmTasks( 'grunt-contrib-copy' );
-       grunt.loadNpmTasks( 'grunt-contrib-csslint' );
        grunt.loadNpmTasks( 'grunt-contrib-jshint' );
        grunt.loadNpmTasks( 'grunt-contrib-watch' );
        grunt.loadNpmTasks( 'grunt-jsonlint' );
@@ -85,11 +84,18 @@
                                src: '<%= jshint.all %>'
                        }
                },
-               csslint: {
+               stylelint: {
                        options: {
-                               csslintrc: '.csslintrc'
+                               stylelintrc: 'lib/ve/.stylelintrc'
                        },
-                       all: 'modules/**/*.css'
+                       src: [
+                               '**/*.css',
+                               '!coverage/**',
+                               '!dist/**',
+                               '!docs/**',
+                               '!lib/**',
+                               '!node_modules/**'
+                       ]
                },
                banana: {
                        all: [
@@ -116,7 +122,7 @@
                        files: [
                                '.{csslintrc,jscsrc,jshintignore,jshintrc}',
                                '<%= jshint.all %>',
-                               '<%= csslint.all %>'
+                               '<%= stylelint.all %>'
                        ],
                        tasks: 'test'
                }
@@ -143,7 +149,7 @@
        } );
 
        grunt.registerTask( 'build', [ 'jsduckcatconfig', 'buildloader' ] );
-       grunt.registerTask( 'lint', [ 'tyops', 'jshint', 'jscs:main', 
'csslint', 'jsonlint', 'banana' ] );
+       grunt.registerTask( 'lint', [ 'tyops', 'jshint', 'jscs:main', 
'stylelint', 'jsonlint', 'banana' ] );
        grunt.registerTask( 'fix', [ 'jscs:fix' ] );
        grunt.registerTask( 'test', [ 'build', 'lint' ] );
        grunt.registerTask( 'test-ci', [ 'git-status' ] );
diff --git 
a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-monobook.css 
b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-monobook.css
index 81dc774..709b5c5 100644
--- 
a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-monobook.css
+++ 
b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-monobook.css
@@ -9,16 +9,16 @@
        border: 1px solid #ccc;
        background: #fff;
        border-radius: 0.25em;
-       box-shadow: 0 0.1em 0.5em rgba(0, 0, 0, 0.15)
+       box-shadow: 0 0.1em 0.5em rgba( 0, 0, 0, 0.15 );
 }
 
 .ve-init-mw-desktopArticleTarget-progress-bar {
        border-right: 1px solid #ccc;
        background: #cde7f4;
-       filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, 
startColorstr='#eaf4fa', endColorstr='#b0d9ee');
-       background-image: -webkit-gradient(linear, right top, right bottom, 
color-stop(0%, #eaf4fa), color-stop(100%, #b0d9ee));
-       background-image: -webkit-linear-gradient(top, #eaf4fa 0%, #b0d9ee 
100%);
-       background-image: -moz-linear-gradient(top, #eaf4fa 0%, #b0d9ee 100%);
-       background-image: -o-linear-gradient(top, #eaf4fa 0%, #b0d9ee 100%);
-       background-image: linear-gradient(to bottom, #eaf4fa 0%, #b0d9ee 100%);
+       filter: progid:DXImageTransform.Microsoft.gradient( GradientType=0, 
startColorstr='#eaf4fa', endColorstr='#b0d9ee' );
+       background-image: -webkit-gradient( linear, right top, right bottom, 
color-stop( 0%, #eaf4fa ), color-stop( 100%, #b0d9ee ) );
+       background-image: -webkit-linear-gradient( top, #eaf4fa 0%, #b0d9ee 
100% );
+       background-image: -moz-linear-gradient( top, #eaf4fa 0%, #b0d9ee 100% );
+       background-image: -o-linear-gradient( top, #eaf4fa 0%, #b0d9ee 100% );
+       background-image: linear-gradient( to bottom, #eaf4fa 0%, #b0d9ee 100% 
);
 }
diff --git 
a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-vector.css 
b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-vector.css
index e2402db..c936ed5 100644
--- a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-vector.css
+++ b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init-vector.css
@@ -10,7 +10,7 @@
        border: 1px solid #347bff;
        background: #fff;
        border-radius: 2px;
-       box-shadow: 0 0.1em 0 0 rgba(0, 0, 0, 0.15)
+       box-shadow: 0 0.1em 0 0 rgba( 0, 0, 0, 0.15 );
 }
 
 .ve-init-mw-desktopArticleTarget-progress-bar {
diff --git a/modules/ve-mw/init/styles/ve.init.mw.DesktopTarget-monobook.css 
b/modules/ve-mw/init/styles/ve.init.mw.DesktopTarget-monobook.css
index bffdaa1..cf28eb4 100644
--- a/modules/ve-mw/init/styles/ve.init.mw.DesktopTarget-monobook.css
+++ b/modules/ve-mw/init/styles/ve.init.mw.DesktopTarget-monobook.css
@@ -14,5 +14,5 @@
        /* Reset -2px from VE-core */
        margin-right: 0;
        /* Monobook sets a background:url(); rule which overrides the colour. 
TODO: Fix upstream */
-       background-color: #E6F1FF;
+       background-color: #e6f1ff;
 }
diff --git a/modules/ve-mw/init/styles/ve.init.mw.MobileArticleTarget.css 
b/modules/ve-mw/init/styles/ve.init.mw.MobileArticleTarget.css
index 82826d0..591a36d 100644
--- a/modules/ve-mw/init/styles/ve.init.mw.MobileArticleTarget.css
+++ b/modules/ve-mw/init/styles/ve.init.mw.MobileArticleTarget.css
@@ -99,8 +99,7 @@
        border-right: 0;
 }
 
-.ve-init-mw-mobileArticleTarget-editTools > .oo-ui-toolGroup > 
.oo-ui-toolGroup-tools
-> .oo-ui-tool {
+.ve-init-mw-mobileArticleTarget-editTools > .oo-ui-toolGroup > 
.oo-ui-toolGroup-tools > .oo-ui-tool {
        width: 100%;
 }
 
diff --git a/modules/ve-mw/ui/styles/dialogs/ve.ui.MWMetaDialog.css 
b/modules/ve-mw/ui/styles/dialogs/ve.ui.MWMetaDialog.css
index d9ed179..29111fe 100644
--- a/modules/ve-mw/ui/styles/dialogs/ve.ui.MWMetaDialog.css
+++ b/modules/ve-mw/ui/styles/dialogs/ve.ui.MWMetaDialog.css
@@ -23,7 +23,7 @@
 .ve-ui-mwLanguagesPage-languages-table th,
 .ve-ui-mwLanguagesPage-languages-table td {
        padding: 0.75em 1em;
-       border-bottom: solid 1px white;
+       border-bottom: 1px solid #fff;
 }
 
 .ve-ui-mwLanguagesPage-languages-table tr td:first-child {
@@ -31,9 +31,9 @@
 }
 
 .ve-ui-mwLanguagesPage-languages-table tr:nth-child( odd ) td {
-       background: #F0F0F0;
+       background: #f0f0f0;
 }
 
 .ve-ui-mwLanguagesPage-languages-table tr:nth-child( even ) td {
-       background: #F8F8F8;
+       background: #f8f8f8;
 }
diff --git a/modules/ve-mw/ui/styles/pages/ve.ui.MWCategoriesPage.css 
b/modules/ve-mw/ui/styles/pages/ve.ui.MWCategoriesPage.css
index 4501f43..e681deb 100644
--- a/modules/ve-mw/ui/styles/pages/ve.ui.MWCategoriesPage.css
+++ b/modules/ve-mw/ui/styles/pages/ve.ui.MWCategoriesPage.css
@@ -6,5 +6,5 @@
  */
 
 .ve-ui-mwCategoriesPage-defaultsort {
-       width:30em;
+       width: 30em;
 }
diff --git a/modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css 
b/modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css
index bb41e76..ac8c47d 100644
--- a/modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css
+++ b/modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css
@@ -64,69 +64,69 @@
 
 @-webkit-keyframes pulse {
        0% {
-               transform: scale(0);
+               transform: scale( 0 );
                opacity: 0.0;
        }
        25% {
-               transform: scale(0);
+               transform: scale( 0 );
                opacity: 0.1;
        }
        50% {
-               transform: scale(0.1);
+               transform: scale( 0.1 );
                opacity: 0.3;
        }
        75% {
-               transform: scale(0.5);
+               transform: scale( 0.5 );
                opacity: 0.5;
        }
        100% {
-               transform: scale(1);
+               transform: scale( 1 );
                opacity: 0.0;
        }
 }
 
 @-moz-keyframes pulse {
        0% {
-               transform: scale(0);
+               transform: scale( 0 );
                opacity: 0.0;
        }
        25% {
-               transform: scale(0);
+               transform: scale( 0 );
                opacity: 0.1;
        }
        50% {
-               transform: scale(0.1);
+               transform: scale( 0.1 );
                opacity: 0.3;
        }
        75% {
-               transform: scale(0.5);
+               transform: scale( 0.5 );
                opacity: 0.5;
        }
        100% {
-               transform: scale(1);
+               transform: scale( 1 );
                opacity: 0.0;
        }
 }
 
 @keyframes pulse {
        0% {
-               transform: scale(0);
+               transform: scale( 0 );
                opacity: 0.0;
        }
        25% {
-               transform: scale(0);
+               transform: scale( 0 );
                opacity: 0.1;
        }
        50% {
-               transform: scale(0.1);
+               transform: scale( 0.1 );
                opacity: 0.3;
        }
        75% {
-               transform: scale(0.5);
+               transform: scale( 0.5 );
                opacity: 0.5;
        }
        100% {
-               transform: scale(1);
+               transform: scale( 1 );
                opacity: 0.0;
        }
 }
\ No newline at end of file
diff --git a/modules/ve-mw/ui/styles/tools/ve.ui.MWLinkInspectorTool.css 
b/modules/ve-mw/ui/styles/tools/ve.ui.MWLinkInspectorTool.css
index 56cdb9d..624f3d4 100644
--- a/modules/ve-mw/ui/styles/tools/ve.ui.MWLinkInspectorTool.css
+++ b/modules/ve-mw/ui/styles/tools/ve.ui.MWLinkInspectorTool.css
@@ -6,6 +6,6 @@
  */
 
 .oo-ui-tool-name-link .oo-ui-popupWidget-body .ve-ui-educationPopup-header {
-       background: url(images/link-ltr.png) no-repeat center/90%;
+       background: url( images/link-ltr.png ) no-repeat center/90%;
        height: 150px;
 }
\ No newline at end of file
diff --git a/modules/ve-mw/ui/styles/widgets/ve.ui.MWAceEditorWidget.css 
b/modules/ve-mw/ui/styles/widgets/ve.ui.MWAceEditorWidget.css
index e5c2c13..86447ff 100644
--- a/modules/ve-mw/ui/styles/widgets/ve.ui.MWAceEditorWidget.css
+++ b/modules/ve-mw/ui/styles/widgets/ve.ui.MWAceEditorWidget.css
@@ -8,7 +8,7 @@
 .ve-ui-mwAceEditorWidget .ace_editor {
        border: 1px solid #ccc;
        margin: 1px;
-       font-family: monospace, Courier;
+       font-family: monospace, 'Courier';
        font-size: inherit;
        line-height: 1.5;
 }
@@ -22,5 +22,5 @@
 }
 
 .ve-ui-mwAceEditorWidget.oo-ui-widget-enabled.oo-ui-flaggedElement-invalid 
.ace_editor {
-       border-color: red;
+       border-color: #f00;
 }
\ No newline at end of file
diff --git a/modules/ve-mw/ui/styles/widgets/ve.ui.MWMediaInfoFieldWidget.css 
b/modules/ve-mw/ui/styles/widgets/ve.ui.MWMediaInfoFieldWidget.css
index 2357acd..66c864d 100644
--- a/modules/ve-mw/ui/styles/widgets/ve.ui.MWMediaInfoFieldWidget.css
+++ b/modules/ve-mw/ui/styles/widgets/ve.ui.MWMediaInfoFieldWidget.css
@@ -24,11 +24,11 @@
        width: 100%;
        padding-top: 1em;
        margin-top: -2em;
-       background: -webkit-linear-gradient( top, rgba( 255, 255, 255, 0 ) 0, 
#fff 50% );
+       background: -webkit-linear-gradient( to top, rgba( 255, 255, 255, 0 ) 
0, #fff 50% );
        background: linear-gradient( to bottom, rgba( 255, 255, 255, 0 ) 0, 
#fff 50% );
 }
 
-.ve-ui-mwMediaInfoFieldWidget.oo-ui-iconElement .oo-ui-labelElement-label  {
+.ve-ui-mwMediaInfoFieldWidget.oo-ui-iconElement .oo-ui-labelElement-label {
        display: block;
        padding: 0.3em 0 0.1em 2.2em;
        line-height: 1.25em;
diff --git a/modules/ve-mw/ui/styles/widgets/ve.ui.MWMediaResultWidget.css 
b/modules/ve-mw/ui/styles/widgets/ve.ui.MWMediaResultWidget.css
index 9091fab..cee30ee 100644
--- a/modules/ve-mw/ui/styles/widgets/ve.ui.MWMediaResultWidget.css
+++ b/modules/ve-mw/ui/styles/widgets/ve.ui.MWMediaResultWidget.css
@@ -15,8 +15,8 @@
        text-align: center;
 }
 
-.ve-ui.mwMediaResultWidget-eol:after {
-       content: ".";
+.ve-ui.mwMediaResultWidget-eol::after {
+       content: '.';
        display: block;
        height: 0;
        clear: both;
@@ -57,7 +57,7 @@
 
 .ve-ui-mwMediaResultWidget.oo-ui-optionWidget-highlighted,
 .ve-ui-mwMediaResultWidget.oo-ui-optionWidget-selected {
-       box-shadow: 0 0 0.3em #a7dcff, 0 0 0 white;
+       box-shadow: 0 0 0.3em #a7dcff, 0 0 0 #fff;
 }
 
 .ve-ui-mwMediaResultWidget-error .ve-ui-mwMediaResultWidget-thumbnail {
diff --git a/modules/ve-mw/ui/styles/widgets/ve.ui.MWTocWidget.css 
b/modules/ve-mw/ui/styles/widgets/ve.ui.MWTocWidget.css
index 816438a..4e81c9f 100644
--- a/modules/ve-mw/ui/styles/widgets/ve.ui.MWTocWidget.css
+++ b/modules/ve-mw/ui/styles/widgets/ve.ui.MWTocWidget.css
@@ -12,14 +12,14 @@
 .ve-ui-mwTocWidget .toctoggle {
        margin: 0.25em;
 }
-.ve-ui-mwTocWidget .toctoggle:before {
+.ve-ui-mwTocWidget .toctoggle::before {
        content: ' [';
 }
-.ve-ui-mwTocWidget .toctoggle:after {
+.ve-ui-mwTocWidget .toctoggle::after {
        content: '] ';
 }
 
-.ve-ui-mwTocWidget .tocnumber:after {
+.ve-ui-mwTocWidget .tocnumber::after {
        content: ' ';
 }
 
diff --git a/modules/ve-mw/ui/themes/vector/ve.ui.MWFormatTool.css 
b/modules/ve-mw/ui/themes/vector/ve.ui.MWFormatTool.css
index 0d43073..40953b3 100644
--- a/modules/ve-mw/ui/themes/vector/ve.ui.MWFormatTool.css
+++ b/modules/ve-mw/ui/themes/vector/ve.ui.MWFormatTool.css
@@ -7,7 +7,7 @@
 
 .oo-ui-menuToolGroup .oo-ui-tool-name-heading1 .oo-ui-tool-title,
 .oo-ui-menuToolGroup .oo-ui-tool-name-heading2 .oo-ui-tool-title {
-       font-family: 'Linux Libertine', Georgia, Times, serif;
+       font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
 }
 
 .oo-ui-menuToolGroup .oo-ui-tool-name-heading1 .oo-ui-tool-title {
diff --git a/package.json b/package.json
index de4266a..fea68a9 100644
--- a/package.json
+++ b/package.json
@@ -14,10 +14,10 @@
     "grunt-jsonlint": "1.0.7",
     "grunt-banana-checker": "0.5.0",
     "grunt-contrib-copy": "1.0.0",
-    "grunt-contrib-csslint": "1.0.0",
     "grunt-contrib-jshint": "1.0.0",
     "grunt-contrib-watch": "1.0.0",
     "grunt-jscs": "2.8.0",
-    "grunt-tyops": "0.1.0"
+    "grunt-tyops": "0.1.0",
+    "stylelint": "6.3.3"
   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7fd79d3e1dce37aef066d416cd969e5fff1e962f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
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