Merge "build: Update linters"

This commit is contained in:
jenkins-bot 2023-09-18 17:37:46 +00:00 committed by Gerrit Code Review
commit 4eed68bb4e
10 changed files with 978 additions and 432 deletions

1
.eslintignore Normal file
View file

@ -0,0 +1 @@
/resources/lib/

View file

@ -13,11 +13,7 @@ module.exports = function ( grunt ) {
cache: true, cache: true,
fix: grunt.option( 'fix' ) fix: grunt.option( 'fix' )
}, },
all: [ all: [ '.' ]
'**/*.{js,json}',
'!resources/lib/**',
'!{vendor,node_modules}/**'
]
}, },
stylelint: { stylelint: {
all: [ all: [

1327
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -15,9 +15,9 @@
"eslint-config-wikimedia": "0.25.1", "eslint-config-wikimedia": "0.25.1",
"grunt": "1.6.1", "grunt": "1.6.1",
"grunt-banana-checker": "0.11.0", "grunt-banana-checker": "0.11.0",
"grunt-eslint": "24.1.0", "grunt-eslint": "24.3.0",
"grunt-stylelint": "0.18.0", "grunt-stylelint": "0.19.0",
"stylelint-config-wikimedia": "0.15.0", "stylelint-config-wikimedia": "0.16.1",
"wdio-mediawiki": "2.1.0" "wdio-mediawiki": "2.1.0"
} }
} }

View file

@ -11,5 +11,16 @@
"rules": { "rules": {
"max-len": "off", "max-len": "off",
"no-implicit-globals": "off" "no-implicit-globals": "off"
} },
"overrides": [
{
"files": [
"addon/edit/*.js"
],
"rules": {
"computed-property-spacing": [ "error", "never" ],
"indent": [ "error", 2 ]
}
}
]
} }

View file

@ -1,11 +0,0 @@
{
"root": true,
"extends": [
"wikimedia/client-es5",
"wikimedia/mediawiki"
],
"rules": {
"computed-property-spacing": [ "error", "never" ],
"indent": [ "error", 2 ]
}
}

View file

@ -1,6 +1,3 @@
/* stylelint-disable selector-list-comma-newline-after, block-opening-brace-newline-before,
block-opening-brace-newline-after, block-closing-brace-space-after */
/* /*
* This style sheet overrides colors in mediawiki.less * This style sheet overrides colors in mediawiki.less
* with more colorblind-friendly colors. * with more colorblind-friendly colors.
@ -15,7 +12,9 @@
.cm-mw-hr, .cm-mw-hr,
.cm-mw-indenting, .cm-mw-indenting,
.cm-mw-apostrophes-bold, .cm-mw-apostrophes-bold,
.cm-mw-apostrophes-italic { color: #e4a400; } .cm-mw-apostrophes-italic {
color: #e4a400;
}
/* tags */ /* tags */
.cm-mw-exttag-name, .cm-mw-exttag-name,
@ -23,7 +22,9 @@
.cm-mw-exttag-attribute, .cm-mw-exttag-attribute,
.cm-mw-htmltag-name, .cm-mw-htmltag-name,
.cm-mw-htmltag-bracket, .cm-mw-htmltag-bracket,
.cm-mw-htmltag-attribute { color: #56b4e9; } .cm-mw-htmltag-attribute {
color: #56b4e9;
}
/* templates */ /* templates */
.cm-mw-template, .cm-mw-template,
@ -31,20 +32,28 @@
.cm-mw-template-name-mnemonic, .cm-mw-template-name-mnemonic,
.cm-mw-template-argument-name, .cm-mw-template-argument-name,
.cm-mw-template-delimiter, .cm-mw-template-delimiter,
.cm-mw-template-bracket { color: #9c3a00; } .cm-mw-template-bracket {
color: #9c3a00;
}
/* variables */ /* variables */
.cm-mw-templatevariable, .cm-mw-templatevariable,
.cm-mw-templatevariable-name, .cm-mw-templatevariable-name,
.cm-mw-templatevariable-bracket, .cm-mw-templatevariable-bracket,
.cm-mw-templatevariable-delimiter { color: #009e73; } .cm-mw-templatevariable-delimiter {
color: #009e73;
}
/* remove background colors */ /* remove background colors */
.cm-mw-matching, .cm-mw-matching,
.cm-mw-skipformatting, .cm-mw-skipformatting,
.cm-mw-doubleUnderscore, .cm-mw-signature, .cm-mw-hr, .cm-mw-doubleUnderscore,
.cm-mw-signature,
.cm-mw-hr,
pre.CodeMirror-line-like.cm-mw-exttag, pre.CodeMirror-line-like.cm-mw-exttag,
.cm-mw-exttag, .cm-mw-tag-pre, .cm-mw-tag-nowiki, .cm-mw-exttag,
.cm-mw-tag-pre,
.cm-mw-tag-nowiki,
.cm-mw-template2-ground, .cm-mw-template2-ground,
.cm-mw-template3-ground, .cm-mw-template3-ground,
.cm-mw-template-ext-ground, .cm-mw-template-ext-ground,
@ -74,5 +83,7 @@
.cm-mw-ext-link-ground, .cm-mw-ext-link-ground,
.cm-mw-ext2-link-ground, .cm-mw-ext2-link-ground,
.cm-mw-ext3-link-ground, .cm-mw-ext3-link-ground,
.cm-mw-link-ground { background-color: transparent; } .cm-mw-link-ground {
background-color: transparent;
}
} }

View file

@ -18,9 +18,14 @@
background-color: average( average( @template-shade, @ext-shade ), @link-shade ); background-color: average( average( @template-shade, @ext-shade ), @link-shade );
} }
/* stylelint-disable block-opening-brace-newline-before, block-opening-brace-newline-after, /* stylelint-disable
block-closing-brace-space-after, declaration-block-single-line-max-declarations, declaration-block-single-line-max-declarations,
declaration-block-semicolon-newline-after, selector-list-comma-newline-after */ stylistic/block-closing-brace-space-after,
stylistic/block-opening-brace-newline-after,
stylistic/block-opening-brace-newline-before,
stylistic/declaration-block-semicolon-newline-after,
stylistic/selector-list-comma-newline-after
*/
.cm-mw-pagename { text-decoration: underline; } .cm-mw-pagename { text-decoration: underline; }

View file

@ -1,5 +1,5 @@
{ {
"globals": { "globals": {
"ve": false "ve": "readonly"
} }
} }

View file

@ -15,12 +15,10 @@
// Skin specific paddings // Skin specific paddings
.skin-vector & { .skin-vector & {
/* stylelint-disable-next-line unit-disallowed-list */
padding: 0 1rem; padding: 0 1rem;
@media screen and ( min-width: 982px ) { @media screen and ( min-width: 982px ) {
.skin-vector-legacy& { .skin-vector-legacy& {
/* stylelint-disable-next-line unit-disallowed-list */
padding: 0 1.5rem; padding: 0 1.5rem;
} }
} }