build: Update linters

eslint-config-wikimedia      0.8.1  →   0.9.0
 stylelint-config-wikimedia   0.4.3  →   0.5.0

Change-Id: I0f55e743c2f38bb8910931c3989a6516e0527703
This commit is contained in:
Ed Sanders
2018-12-10 14:24:24 +00:00
parent efae824f31
commit 7bf345669a
7 changed files with 16 additions and 15 deletions

View File

@@ -1,10 +1,9 @@
{
"extends": "wikimedia",
"env": {
"browser": true
},
"extends": [
"wikimedia/client",
"wikimedia/jquery"
],
"globals": {
"$": false,
"mw": false,
"OO": false
},

View File

@@ -36,7 +36,7 @@ module.exports = function ( grunt ) {
svgmin: {
options: {
js2svg: {
indent: ' ',
indent: '\t',
pretty: true
},
multipass: true,

View File

@@ -4,16 +4,14 @@
"test": "grunt test"
},
"devDependencies": {
"eslint-config-wikimedia": "0.8.1",
"eslint-plugin-qunit": "3.3.1",
"eslint-config-wikimedia": "0.9.0",
"grunt": "1.0.3",
"grunt-banana-checker": "0.6.0",
"grunt-eslint": "21.0.0",
"grunt-jsonlint": "1.1.0",
"grunt-stylelint": "0.10.1",
"grunt-svgmin": "5.0.0",
"stylelint": "9.2.0",
"stylelint-config-wikimedia": "0.4.3"
"stylelint-config-wikimedia": "0.5.0"
},
"eslintIgnore": [
"lib/**",

View File

@@ -34,13 +34,11 @@
width: 100%;
/* Using border instead of outline for focus (outline doesn't have enough space) */
outline: 0;
color: #222;
padding: 5px 0 5px 42px;
border: 1px solid transparent;
background: left 15px top 6px transparent no-repeat;
background-size: 20px auto;
cursor: pointer;
// Remove the dotted border for Firefox

View File

@@ -60,6 +60,7 @@
.uls-no-found-more {
background-color: #fff;
}
h3 {
padding: 0 28px;
margin: 0;

View File

@@ -11,6 +11,7 @@
position: absolute;
content: '';
}
&.selector-right {
&:before {
/* @noflip */
@@ -18,6 +19,7 @@
/* @noflip */
right: -11px;
}
&:after {
/* @noflip */
border-left: 10px solid #fff;
@@ -25,6 +27,7 @@
right: -10px;
}
}
&.selector-left {
&:before {
/* @noflip */
@@ -32,6 +35,7 @@
/* @noflip */
left: -11px;
}
&:after {
/* @noflip */
border-right: 10px solid #fff;

View File

@@ -217,6 +217,7 @@
self = this,
ulsLanguageList = {};
// eslint-disable-next-line jquery/no-each-util
$.each( this.interlanguageList, function ( languageCode, el ) {
ulsLanguageList[ languageCode ] = el.textContent;
} );
@@ -408,7 +409,7 @@
*/
CompactInterlanguageList.prototype.getLangsInText = function () {
var languagesInText = [];
$.each( document.querySelectorAll( '#mw-content-text [lang]' ), function ( i, el ) {
Array.prototype.forEach.call( document.querySelectorAll( '#mw-content-text [lang]' ), function ( el ) {
var lang = convertMediaWikiLanguageCodeToULS( el.lang );
if ( languagesInText.indexOf( lang ) === -1 ) {
languagesInText.push( lang );
@@ -425,7 +426,7 @@
* @return {string[]} Language codes
*/
CompactInterlanguageList.prototype.getLangsWithBadges = function () {
return $.map(
return Array.prototype.map.call(
document.querySelectorAll( '#p-lang [class*="badge"]' ),
function ( el ) {
return convertMediaWikiLanguageCodeToULS(
@@ -443,7 +444,7 @@
CompactInterlanguageList.prototype.getInterlanguageList = function () {
var interlanguageList = {};
$.each( this.listElement.querySelectorAll( '.interlanguage-link-target' ), function ( i, el ) {
Array.prototype.forEach.call( this.listElement.querySelectorAll( '.interlanguage-link-target' ), function ( el ) {
var langCode = convertMediaWikiLanguageCodeToULS( el.lang );
interlanguageList[ langCode ] = el;
} );