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:
@@ -1,10 +1,9 @@
|
|||||||
{
|
{
|
||||||
"extends": "wikimedia",
|
"extends": [
|
||||||
"env": {
|
"wikimedia/client",
|
||||||
"browser": true
|
"wikimedia/jquery"
|
||||||
},
|
],
|
||||||
"globals": {
|
"globals": {
|
||||||
"$": false,
|
|
||||||
"mw": false,
|
"mw": false,
|
||||||
"OO": false
|
"OO": false
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ module.exports = function ( grunt ) {
|
|||||||
svgmin: {
|
svgmin: {
|
||||||
options: {
|
options: {
|
||||||
js2svg: {
|
js2svg: {
|
||||||
indent: ' ',
|
indent: '\t',
|
||||||
pretty: true
|
pretty: true
|
||||||
},
|
},
|
||||||
multipass: true,
|
multipass: true,
|
||||||
|
|||||||
@@ -4,16 +4,14 @@
|
|||||||
"test": "grunt test"
|
"test": "grunt test"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint-config-wikimedia": "0.8.1",
|
"eslint-config-wikimedia": "0.9.0",
|
||||||
"eslint-plugin-qunit": "3.3.1",
|
|
||||||
"grunt": "1.0.3",
|
"grunt": "1.0.3",
|
||||||
"grunt-banana-checker": "0.6.0",
|
"grunt-banana-checker": "0.6.0",
|
||||||
"grunt-eslint": "21.0.0",
|
"grunt-eslint": "21.0.0",
|
||||||
"grunt-jsonlint": "1.1.0",
|
"grunt-jsonlint": "1.1.0",
|
||||||
"grunt-stylelint": "0.10.1",
|
"grunt-stylelint": "0.10.1",
|
||||||
"grunt-svgmin": "5.0.0",
|
"grunt-svgmin": "5.0.0",
|
||||||
"stylelint": "9.2.0",
|
"stylelint-config-wikimedia": "0.5.0"
|
||||||
"stylelint-config-wikimedia": "0.4.3"
|
|
||||||
},
|
},
|
||||||
"eslintIgnore": [
|
"eslintIgnore": [
|
||||||
"lib/**",
|
"lib/**",
|
||||||
|
|||||||
@@ -34,13 +34,11 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
/* Using border instead of outline for focus (outline doesn't have enough space) */
|
/* Using border instead of outline for focus (outline doesn't have enough space) */
|
||||||
outline: 0;
|
outline: 0;
|
||||||
|
|
||||||
color: #222;
|
color: #222;
|
||||||
padding: 5px 0 5px 42px;
|
padding: 5px 0 5px 42px;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
background: left 15px top 6px transparent no-repeat;
|
background: left 15px top 6px transparent no-repeat;
|
||||||
background-size: 20px auto;
|
background-size: 20px auto;
|
||||||
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
// Remove the dotted border for Firefox
|
// Remove the dotted border for Firefox
|
||||||
|
|||||||
@@ -60,6 +60,7 @@
|
|||||||
.uls-no-found-more {
|
.uls-no-found-more {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
padding: 0 28px;
|
padding: 0 28px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
content: '';
|
content: '';
|
||||||
}
|
}
|
||||||
|
|
||||||
&.selector-right {
|
&.selector-right {
|
||||||
&:before {
|
&:before {
|
||||||
/* @noflip */
|
/* @noflip */
|
||||||
@@ -18,6 +19,7 @@
|
|||||||
/* @noflip */
|
/* @noflip */
|
||||||
right: -11px;
|
right: -11px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
/* @noflip */
|
/* @noflip */
|
||||||
border-left: 10px solid #fff;
|
border-left: 10px solid #fff;
|
||||||
@@ -25,6 +27,7 @@
|
|||||||
right: -10px;
|
right: -10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.selector-left {
|
&.selector-left {
|
||||||
&:before {
|
&:before {
|
||||||
/* @noflip */
|
/* @noflip */
|
||||||
@@ -32,6 +35,7 @@
|
|||||||
/* @noflip */
|
/* @noflip */
|
||||||
left: -11px;
|
left: -11px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
/* @noflip */
|
/* @noflip */
|
||||||
border-right: 10px solid #fff;
|
border-right: 10px solid #fff;
|
||||||
|
|||||||
@@ -217,6 +217,7 @@
|
|||||||
self = this,
|
self = this,
|
||||||
ulsLanguageList = {};
|
ulsLanguageList = {};
|
||||||
|
|
||||||
|
// eslint-disable-next-line jquery/no-each-util
|
||||||
$.each( this.interlanguageList, function ( languageCode, el ) {
|
$.each( this.interlanguageList, function ( languageCode, el ) {
|
||||||
ulsLanguageList[ languageCode ] = el.textContent;
|
ulsLanguageList[ languageCode ] = el.textContent;
|
||||||
} );
|
} );
|
||||||
@@ -408,7 +409,7 @@
|
|||||||
*/
|
*/
|
||||||
CompactInterlanguageList.prototype.getLangsInText = function () {
|
CompactInterlanguageList.prototype.getLangsInText = function () {
|
||||||
var languagesInText = [];
|
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 );
|
var lang = convertMediaWikiLanguageCodeToULS( el.lang );
|
||||||
if ( languagesInText.indexOf( lang ) === -1 ) {
|
if ( languagesInText.indexOf( lang ) === -1 ) {
|
||||||
languagesInText.push( lang );
|
languagesInText.push( lang );
|
||||||
@@ -425,7 +426,7 @@
|
|||||||
* @return {string[]} Language codes
|
* @return {string[]} Language codes
|
||||||
*/
|
*/
|
||||||
CompactInterlanguageList.prototype.getLangsWithBadges = function () {
|
CompactInterlanguageList.prototype.getLangsWithBadges = function () {
|
||||||
return $.map(
|
return Array.prototype.map.call(
|
||||||
document.querySelectorAll( '#p-lang [class*="badge"]' ),
|
document.querySelectorAll( '#p-lang [class*="badge"]' ),
|
||||||
function ( el ) {
|
function ( el ) {
|
||||||
return convertMediaWikiLanguageCodeToULS(
|
return convertMediaWikiLanguageCodeToULS(
|
||||||
@@ -443,7 +444,7 @@
|
|||||||
CompactInterlanguageList.prototype.getInterlanguageList = function () {
|
CompactInterlanguageList.prototype.getInterlanguageList = function () {
|
||||||
var interlanguageList = {};
|
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 );
|
var langCode = convertMediaWikiLanguageCodeToULS( el.lang );
|
||||||
interlanguageList[ langCode ] = el;
|
interlanguageList[ langCode ] = el;
|
||||||
} );
|
} );
|
||||||
|
|||||||
Reference in New Issue
Block a user