build: Update stylelint
authorEd Sanders <esanders@wikimedia.org>
Fri, 27 Oct 2017 12:31:41 +0000 (13:31 +0100)
committerEd Sanders <esanders@wikimedia.org>
Fri, 27 Oct 2017 12:31:41 +0000 (13:31 +0100)
Change-Id: I5a0ccb26a54109e641fd121c6427a71e82e05c74

18 files changed:
.stylelintrc.json
Gruntfile.js
package.json
resources/src/mediawiki.action/mediawiki.action.history.css
resources/src/mediawiki.legacy/commonPrint.css
resources/src/mediawiki.legacy/shared.css
resources/src/mediawiki.less/mediawiki.ui/mixins.less
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.mixins.less
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.highlightCircles.seenunseen.less
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.TagItemWidget.less
resources/src/mediawiki.skinning/content.externallinks.css
resources/src/mediawiki.skinning/content.parsoid.less
resources/src/mediawiki.skinning/elements.css
resources/src/mediawiki.special/mediawiki.special.comparepages.styles.less
resources/src/mediawiki.ui/components/checkbox.less
resources/src/mediawiki.ui/components/forms.less
resources/src/mediawiki.ui/components/inputs.less
resources/src/mediawiki.ui/components/radio.less

index 27e289d..60c8f36 100644 (file)
@@ -3,6 +3,6 @@
        "rules": {
                "no-descending-specificity": null,
 
-               "selector-no-id": null
+               "selector-max-id": null
        }
 }
index dbbfcb8..d1ef72f 100644 (file)
@@ -62,9 +62,6 @@ module.exports = function ( grunt ) {
                        installer: 'includes/installer/i18n/'
                },
                stylelint: {
-                       options: {
-                               syntax: 'less'
-                       },
                        src: '{resources/src,mw-config}/**/*.{css,less}'
                },
                watch: {
index c30e150..8ff77d8 100644 (file)
@@ -26,8 +26,8 @@
     "karma-qunit": "1.2.1",
     "nodemw": "0.10.1",
     "qunitjs": "2.4.0",
-    "stylelint": "7.8.0",
-    "stylelint-config-wikimedia": "0.4.1",
+    "stylelint": "8.2.0",
+    "stylelint-config-wikimedia": "0.4.2",
     "wdio-junit-reporter": "0.2.0",
     "wdio-mocha-framework": "0.5.8",
     "wdio-sauce-service": "^0.3.1",
index f3ea163..520917a 100644 (file)
@@ -1,6 +1,6 @@
 /* Styles for the JavaScript enhancements of the history page */
 
-#pagehistory li.before input[name='oldid'],
-#pagehistory li.after input[name='diff'] {
+#pagehistory li.before input[ name='oldid' ],
+#pagehistory li.after input[ name='diff' ] {
        visibility: hidden;
 }
index 8ff0634..6931c7d 100644 (file)
@@ -77,8 +77,8 @@ a.stub {
 }
 
 /* Expand protocol-relative URLs for printing */
-.mw-body-content a.external.text[href^='//']:after,
-.mw-body-content a.external.autonumber[href^='//']:after {
+.mw-body-content a.external.text[ href^='//' ]:after,
+.mw-body-content a.external.autonumber[ href^='//' ]:after {
        content: ' (https:' attr( href ) ')';
 }
 
index 74233d6..ecdfb61 100644 (file)
@@ -56,36 +56,36 @@ wbr {
 
 /* Input types that should follow user direction, like buttons */
 /* TODO: What about buttons in wikipage content ? */
-input[type='submit'],
-input[type='button'],
-input[type='reset'],
-input[type='file'] {
+input[ type='submit' ],
+input[ type='button' ],
+input[ type='reset' ],
+input[ type='file' ] {
        direction: ltr;
 }
 
 /* Override default values */
-textarea[dir='ltr'],
-input[dir='ltr'] {
+textarea[ dir='ltr' ],
+input[ dir='ltr' ] {
        /* @noflip */
        direction: ltr;
 }
 
-textarea[dir='rtl'],
-input[dir='rtl'] {
+textarea[ dir='rtl' ],
+input[ dir='rtl' ] {
        /* @noflip */
        direction: rtl;
 }
 
 /* Default style for semantic tags */
-abbr[title],
-.explain[title] {
+abbr[ title ],
+.explain[ title ] {
        border-bottom: 1px dotted;
        cursor: help;
 }
 
 @supports ( text-decoration: underline dotted ) {
-       abbr[title],
-       .explain[title] {
+       abbr[ title ],
+       .explain[ title ] {
                border-bottom: 0;
                text-decoration: underline dotted;
        }
index 505aa61..1e078bd 100644 (file)
@@ -17,8 +17,8 @@
        line-height: normal;
        font-weight: normal;
 
-       & > input[type='checkbox'],
-       & > input[type='radio'] {
+       & > input[ type='checkbox' ],
+       & > input[ type='radio' ] {
                width: auto;
                height: auto;
                margin: 0 0.1em 0 0;
index f3d81b7..790e015 100644 (file)
@@ -55,9 +55,9 @@
 // work if the rules are inside the above widget LESS scope
 .highlight-changesListWrapperWidget( @bgcolor ) {
        .mw-rcfilters-ui-changesListWrapperWidget li&,
-               .mw-rcfilters-ui-changesListWrapperWidget & tr:first-child,
-               .mw-rcfilters-ui-changesListWrapperWidget tr&.mw-rcfilters-ui-changesListWrapperWidget-enhanced-toplevel:not(.mw-rcfilters-ui-changesListWrapperWidget-enhanced-grey) td:not( :nth-child( -n+2 ) ),
-               .mw-rcfilters-ui-changesListWrapperWidget tr&.mw-rcfilters-ui-changesListWrapperWidget-enhanced-nested:not(.mw-rcfilters-ui-changesListWrapperWidget-enhanced-grey) td:not( :nth-child( -n+4 ) ) {
+       .mw-rcfilters-ui-changesListWrapperWidget & tr:first-child,
+       .mw-rcfilters-ui-changesListWrapperWidget tr&.mw-rcfilters-ui-changesListWrapperWidget-enhanced-toplevel:not( .mw-rcfilters-ui-changesListWrapperWidget-enhanced-grey ) td:not( :nth-child( -n+2 ) ),
+       .mw-rcfilters-ui-changesListWrapperWidget tr&.mw-rcfilters-ui-changesListWrapperWidget-enhanced-nested:not( .mw-rcfilters-ui-changesListWrapperWidget-enhanced-grey ) td:not( :nth-child( -n+4 ) ) {
                background-color: @bgcolor;
        }
 }
index deaee28..5f6fbea 100644 (file)
@@ -21,7 +21,7 @@
                                                .mw-rcfilters-mixin-circle( @highlight-none, @result-circle-diameter, 0, true, @highlight-grey, true );
                                        }
 
-                                       .mw-rcfilters-ui-changesListWrapperWidget:not(.mw-rcfilters-ui-changesListWrapperWidget-highlighted) & {
+                                       .mw-rcfilters-ui-changesListWrapperWidget:not( .mw-rcfilters-ui-changesListWrapperWidget-highlighted ) & {
                                                .mw-rcfilters-mixin-circle( @highlight-none, @result-circle-diameter, 0, true, @highlight-bluedot, true );
                                        }
                                }
@@ -31,7 +31,7 @@
                                                .mw-rcfilters-mixin-circle( @highlight-grey, @result-circle-diameter, 0, true, @highlight-grey );
                                        }
 
-                                       .mw-rcfilters-ui-changesListWrapperWidget:not(.mw-rcfilters-ui-changesListWrapperWidget-highlighted) & {
+                                       .mw-rcfilters-ui-changesListWrapperWidget:not( .mw-rcfilters-ui-changesListWrapperWidget-highlighted ) & {
                                                .mw-rcfilters-mixin-circle( @highlight-bluedot, @result-circle-diameter, 0, true, @highlight-bluedot );
                                        }
                                }
index 0e7a635..e9c982a 100644 (file)
                        top: 50%;
                }
 
-               &[data-color='c1']:before {
+               &[ data-color='c1' ]:before {
                        .mw-rcfilters-mixin-circle( @highlight-c1, 10px, ~'-5px 0.5em 0 0' );
                }
 
-               &[data-color='c2']:before {
+               &[ data-color='c2' ]:before {
                        .mw-rcfilters-mixin-circle( @highlight-c2, 10px, ~'-5px 0.5em 0 0' );
                }
 
-               &[data-color='c3']:before {
+               &[ data-color='c3' ]:before {
                        .mw-rcfilters-mixin-circle( @highlight-c3, 10px, ~'-5px 0.5em 0 0' );
                }
 
-               &[data-color='c4']:before {
+               &[ data-color='c4' ]:before {
                        .mw-rcfilters-mixin-circle( @highlight-c4, 10px, ~'-5px 0.5em 0 0' );
                }
 
-               &[data-color='c5']:before {
+               &[ data-color='c5' ]:before {
                        .mw-rcfilters-mixin-circle( @highlight-c5, 10px, ~'-5px 0.5em 0 0' );
                }
        }
index cd674ef..2a64aa3 100644 (file)
@@ -19,7 +19,7 @@
        padding-right: 15px;
 }
 
-.mw-body-content a.external[href^='mailto:'],
+.mw-body-content a.external[ href^='mailto:' ],
 .link-mailto {
        background: url( images/mail.png ) center right no-repeat;
        /* @embed */
@@ -27,7 +27,7 @@
        padding-right: 15px;
 }
 
-.mw-body-content a.external[href^='ftp://'],
+.mw-body-content a.external[ href^='ftp://' ],
 .link-ftp {
        background: url( images/ftp-ltr.png ) center right no-repeat;
        /* @embed */
@@ -35,8 +35,8 @@
        padding-right: 15px;
 }
 
-.mw-body-content a.external[href^='irc://'],
-.mw-body-content a.external[href^='ircs://'],
+.mw-body-content a.external[ href^='irc://' ],
+.mw-body-content a.external[ href^='ircs://' ],
 .link-irc {
        background: url( images/chat-ltr.png ) center right no-repeat;
        /* @embed */
        padding-right: 15px;
 }
 
-.mw-body-content a.external[href$='.ogg'],
-.mw-body-content a.external[href$='.OGG'],
-.mw-body-content a.external[href$='.mid'],
-.mw-body-content a.external[href$='.MID'],
-.mw-body-content a.external[href$='.midi'],
-.mw-body-content a.external[href$='.MIDI'],
-.mw-body-content a.external[href$='.mp3'],
-.mw-body-content a.external[href$='.MP3'],
-.mw-body-content a.external[href$='.wav'],
-.mw-body-content a.external[href$='.WAV'],
-.mw-body-content a.external[href$='.wma'],
-.mw-body-content a.external[href$='.WMA'],
+.mw-body-content a.external[ href$='.ogg' ],
+.mw-body-content a.external[ href$='.OGG' ],
+.mw-body-content a.external[ href$='.mid' ],
+.mw-body-content a.external[ href$='.MID' ],
+.mw-body-content a.external[ href$='.midi' ],
+.mw-body-content a.external[ href$='.MIDI' ],
+.mw-body-content a.external[ href$='.mp3' ],
+.mw-body-content a.external[ href$='.MP3' ],
+.mw-body-content a.external[ href$='.wav' ],
+.mw-body-content a.external[ href$='.WAV' ],
+.mw-body-content a.external[ href$='.wma' ],
+.mw-body-content a.external[ href$='.WMA' ],
 .link-audio {
        background: url( images/audio-ltr.png ) center right no-repeat;
        /* @embed */
        padding-right: 15px;
 }
 
-.mw-body-content a.external[href$='.ogm'],
-.mw-body-content a.external[href$='.OGM'],
-.mw-body-content a.external[href$='.avi'],
-.mw-body-content a.external[href$='.AVI'],
-.mw-body-content a.external[href$='.mpeg'],
-.mw-body-content a.external[href$='.MPEG'],
-.mw-body-content a.external[href$='.mpg'],
-.mw-body-content a.external[href$='.MPG'],
+.mw-body-content a.external[ href$='.ogm' ],
+.mw-body-content a.external[ href$='.OGM' ],
+.mw-body-content a.external[ href$='.avi' ],
+.mw-body-content a.external[ href$='.AVI' ],
+.mw-body-content a.external[ href$='.mpeg' ],
+.mw-body-content a.external[ href$='.MPEG' ],
+.mw-body-content a.external[ href$='.mpg' ],
+.mw-body-content a.external[ href$='.MPG' ],
 .link-video {
        background: url( images/video.png ) center right no-repeat;
        /* @embed */
        padding-right: 15px;
 }
 
-.mw-body-content a.external[href$='.pdf'],
-.mw-body-content a.external[href$='.PDF'],
-.mw-body-content a.external[href*='.pdf#'],
-.mw-body-content a.external[href*='.PDF#'],
-.mw-body-content a.external[href*='.pdf?'],
-.mw-body-content a.external[href*='.PDF?'],
+.mw-body-content a.external[ href$='.pdf' ],
+.mw-body-content a.external[ href$='.PDF' ],
+.mw-body-content a.external[ href*='.pdf#' ],
+.mw-body-content a.external[ href*='.PDF#' ],
+.mw-body-content a.external[ href*='.pdf?' ],
+.mw-body-content a.external[ href*='.PDF?' ],
 .link-document {
        background: url( images/document-ltr.png ) center right no-repeat;
        /* @embed */
index 654b655..a36ba6c 100644 (file)
@@ -44,9 +44,9 @@ sub {
 /**
  * Block media items
  */
-figure[typeof*='mw:Image'],
-figure[typeof*='mw:Video'],
-figure[typeof*='mw:Audio'] {
+figure[ typeof*='mw:Image' ],
+figure[ typeof*='mw:Video' ],
+figure[ typeof*='mw:Audio' ] {
        margin: 0;
 
        a {
@@ -91,12 +91,12 @@ figure[typeof*='mw:Audio'] {
        }
 }
 
-figure[typeof~='mw:Image/Thumb'],
-figure[typeof~='mw:Video/Thumb'],
-figure[typeof~='mw:Audio/Thumb'],
-figure[typeof~='mw:Image/Frame'],
-figure[typeof~='mw:Video/Frame'],
-figure[typeof~='mw:Audio/Frame'] {
+figure[ typeof~='mw:Image/Thumb' ],
+figure[ typeof~='mw:Video/Thumb' ],
+figure[ typeof~='mw:Audio/Thumb' ],
+figure[ typeof~='mw:Image/Frame' ],
+figure[ typeof~='mw:Video/Frame' ],
+figure[ typeof~='mw:Audio/Frame' ] {
        display: table;
        text-align: center;
        border: 1px solid #c8ccd1;
@@ -139,9 +139,9 @@ figure[typeof~='mw:Audio/Frame'] {
        }
 }
 
-figure[typeof*='mw:Image/Thumb'],
-figure[typeof*='mw:Video/Thumb'],
-figure[typeof*='mw:Audio/Thumb'] {
+figure[ typeof*='mw:Image/Thumb' ],
+figure[ typeof*='mw:Video/Thumb' ],
+figure[ typeof*='mw:Audio/Thumb' ] {
        > a:after {
                content: '';
                width: 15px;
index 245fb53..366c5a9 100644 (file)
@@ -13,7 +13,7 @@ a {
        background: none;
 }
 
-a:not( [href] ) {
+a:not( [ href ] ) {
        cursor: pointer; /* Always cursor:pointer even without href */
 }
 
index c951169..87b7a8b 100644 (file)
@@ -10,7 +10,7 @@
        .box-sizing( border-box );
 }
 
-.mw-special-ComparePages .oo-ui-layout.oo-ui-panelLayout.oo-ui-panelLayout-padded.oo-ui-panelLayout-framed:nth-of-type(2) {
+.mw-special-ComparePages .oo-ui-layout.oo-ui-panelLayout.oo-ui-panelLayout-padded.oo-ui-panelLayout-framed:nth-of-type( 2 ) {
        margin-left: 2%;
 }
 
index c1626db..0c13daf 100644 (file)
@@ -49,7 +49,7 @@
                vertical-align: middle;
        }
 
-       [type='checkbox'] {
+       [ type='checkbox' ] {
                display: table-cell;
                position: relative;
                // Ensure the invisible input takes up the required `width` & `height`
index d3c76d0..0a9023e 100644 (file)
@@ -66,7 +66,7 @@
        }
 
        // Override input styling just for checkboxes and radio inputs.
-       input[type='radio'] {
+       input[ type='radio' ] {
                display: inline;
                .box-sizing( content-box );
                width: auto;
index 74dc0b7..1c79d52 100644 (file)
@@ -73,7 +73,7 @@
        }
 
        // Normalize styling for `<input type="search">`
-       &[type='search'] {
+       &[ type='search' ] {
                // Correct the odd appearance in Chrome and Safari 5
                -webkit-appearance: textfield;
 
@@ -103,7 +103,7 @@ textarea.mw-ui-input {
 // <button class="mw-ui-button mw-ui-progressive">Submit</button>
 //
 // Styleguide 1.2.
-input[type='number'],
+input[ type='number' ],
 .mw-ui-input-inline {
        display: inline-block;
        width: auto;
index 3d82e8e..d9b7c6d 100644 (file)
                vertical-align: middle;
        }
 
-       [type='radio'] {
+       [ type='radio' ] {
                // ensure the invisible radio takes up the required width
                width: @sizeInputBinary;
                height: @sizeInputBinary;
                // This is needed for Firefox mobile (See T73750 to workaround default Firefox stylesheet)
                max-width: none;
                margin: 0;
-               // Hide `input[type=radio]` and instead style the label that follows
+               // Hide `input[ type=radio ]` and instead style the label that follows
                // Support: VoiceOver. Use `opacity` so that VoiceOver can still identify the radio
                opacity: 0;