build: Update linter libs

* "eslint-config-wikimedia": "0.26.0"
* "grunt-eslint": "24.3.0"
* "grunt-stylelint": "0.19.0"
* "stylelint-config-wikimedia": "0.16.1"

Including auto fixes.

Change-Id: Iadacfc781a48675022144bb8c9489073d0bc19e3
This commit is contained in:
WMDE-Fisch 2023-12-12 14:21:07 +01:00
parent dda42b9aed
commit 2a02f5311d
5 changed files with 2286 additions and 1100 deletions

View file

@ -21,7 +21,7 @@ ve.dm.citeExample.refListItemClipboard = function ( text ) {
<div class="mw-content-ltr ve-ui-previewElement ve-ui-mwPreviewElement mw-body-content mw-parser-output">
<span class="ve-ce-branchNode ve-ce-internalItemNode">
<p class="ve-ce-branchNode ve-ce-contentBranchNode ve-ce-paragraphNode ve-ce-generated-wrapper">
${text}
${ text }
</p>
</span>
</div>
@ -54,7 +54,7 @@ ve.dm.citeExample.domToDataCases = {
<a href="#cite_note-bar-1">[1]</a>
</sup>
Yay
${/* This reference has .body.id instead of .body.html */''}
${ /* This reference has .body.id instead of .body.html */'' }
<sup about="#mwt4" class="mw-ref reference" data-mw='{"name":"ref","body":{"id":"mw-cite-3"},"attrs":{"group":"g1"}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref">
<a href="#cite_note-3">[g1 2]</a>
</sup>
@ -68,8 +68,8 @@ ve.dm.citeExample.domToDataCases = {
<a href="#cite_ref-foo-4">[g1 3]</a>
</sup>
</p>
${/* The HTML below is enriched to wrap reference contents in <span id="mw-cite-[...]"> */''}
${/* which Parsoid doesn't do yet, but T88290 asks for */''}
${ /* The HTML below is enriched to wrap reference contents in <span id="mw-cite-[...]"> */'' }
${ /* which Parsoid doesn't do yet, but T88290 asks for */'' }
<ol class="references" typeof="mw:Extension/references" about="#mwt7"
data-mw='{"name":"references","body":{
"html":"<sup about=\\"#mwt8\\" class=\\"mw-ref reference\\"
@ -131,7 +131,7 @@ ve.dm.citeExample.domToDataCases = {
<a style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a>
</sup>
Yay
${/* This reference has .body.id instead of .body.html */''}
${ /* This reference has .body.id instead of .body.html */'' }
<sup typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-cite-3","html":"No name"},"attrs":{"group":"g1"}}' class="mw-ref reference">
<a data-mw-group="g1" style="counter-reset: mw-Ref 2;"><span class="mw-reflink-text">[g1 2]</span></a>
</sup>
@ -144,8 +144,8 @@ ve.dm.citeExample.domToDataCases = {
<a data-mw-group="g1" style="counter-reset: mw-Ref 3;"><span class="mw-reflink-text">[g1 3]</span></a>
</sup>
</p>
${/* The HTML below is enriched to wrap reference contents in <span id="mw-cite-[...]"> */''}
${/* which Parsoid doesn't do yet, but T88290 asks for */''}
${ /* The HTML below is enriched to wrap reference contents in <span id="mw-cite-[...]"> */'' }
${ /* which Parsoid doesn't do yet, but T88290 asks for */'' }
<div typeof="mw:Extension/references"
data-mw='{"name":"references","attrs":{"group":"g1"},"body":{
"html":"<sup typeof=\\"mw:Extension/ref\\"
@ -154,15 +154,15 @@ ve.dm.citeExample.domToDataCases = {
<ol class="mw-references references" data-mw-group="g1">
<li>
<a rel="mw:referencedBy" data-mw-group="g1"><span class="mw-linkback-text"> </span></a>
${ve.dm.citeExample.refListItemClipboard( 'Quux' )}
${ ve.dm.citeExample.refListItemClipboard( 'Quux' ) }
</li>
<li>
<a rel="mw:referencedBy" data-mw-group="g1"><span class="mw-linkback-text"> </span></a>
${ve.dm.citeExample.refListItemClipboard( 'No name' )}
${ ve.dm.citeExample.refListItemClipboard( 'No name' ) }
</li>
<li>
<a rel="mw:referencedBy" data-mw-group="g1"><span class="mw-linkback-text"> </span></a>
${ve.dm.citeExample.refListItemClipboard( 'Ref in refs' )}
${ ve.dm.citeExample.refListItemClipboard( 'Ref in refs' ) }
</li>
</ol>
</div>
@ -561,7 +561,7 @@ ve.dm.citeExample.domToDataCases = {
clipboardBody: ve.dm.example.singleLine`
<p><sup typeof="mw:Extension/ref" data-mw='{"attrs":{"group":"notes"},"body":{"id":"mw-reference-text-cite_note-1","html":"Foo"},"name":"ref"}' class="mw-ref reference"><a data-mw-group="notes" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[notes 1]</span></a></sup></p>
<div typeof="mw:Extension/references" data-mw='{"parts":[{"template":{"params":{"1":{"wt":"<references group=\\"notes\\" />"}},"target":{"wt":"echo","href":"./Template:Echo"},"i":0}}],"name":"references"}'>
${/* TODO: This should list should get populated on copy */''}
${ /* TODO: This should list should get populated on copy */'' }
<ol class="mw-references references"></ol>
</div>
`,
@ -648,7 +648,7 @@ ve.dm.citeExample.domToDataCases = {
<ol class="mw-references references">
<li>
<a rel="mw:referencedBy"><span class="mw-linkback-text"> </span></a>
${ve.dm.citeExample.refListItemClipboard( 'Foo' )}
${ ve.dm.citeExample.refListItemClipboard( 'Foo' ) }
</li>
</ol>
</div>

View file

@ -25,17 +25,17 @@ QUnit.test( 'Diffing', function ( assert ) {
{
msg: 'Simple ref change',
oldDoc: ve.dm.example.singleLine`
<p>${ref( 'Foo' )}${ref( 'Bar' )}${ref( 'Baz' )}</p>
<p>${ ref( 'Foo' ) }${ ref( 'Bar' ) }${ ref( 'Baz' ) }</p>
<h2>Notes</h2>
<div typeof="mw:Extension/references" data-mw="{&quot;name&quot;:&quot;references&quot;}"></div>
`,
newDoc: ve.dm.example.singleLine`
<p>${ref( 'Foo' )}${ref( 'Bar ish' )}${ref( 'Baz' )}</p>
<p>${ ref( 'Foo' ) }${ ref( 'Bar ish' ) }${ ref( 'Baz' ) }</p>
<h2>Notes</h2>
<div typeof="mw:Extension/references" data-mw="{&quot;name&quot;:&quot;references&quot;}"></div>
`,
expected: ve.dm.example.singleLine`
${spacer}
${ spacer }
<h2 data-diff-action="none">Notes</h2>
<ol>
<li value="1"><p data-diff-action="none">Foo</p></li>

3321
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -12,12 +12,12 @@
"@wdio/local-runner": "7.30.1",
"@wdio/mocha-framework": "7.26.0",
"@wdio/spec-reporter": "7.29.1",
"eslint-config-wikimedia": "0.25.1",
"eslint-config-wikimedia": "0.26.0",
"grunt": "1.6.1",
"grunt-banana-checker": "0.11.0",
"grunt-eslint": "24.1.0",
"grunt-stylelint": "0.18.0",
"stylelint-config-wikimedia": "0.15.0",
"grunt-eslint": "24.3.0",
"grunt-stylelint": "0.19.0",
"stylelint-config-wikimedia": "0.16.1",
"wdio-mediawiki": "2.3.0"
}
}

View file

@ -4,10 +4,21 @@ const Page = require( 'wdio-mediawiki/Page' ),
Util = require( 'wdio-mediawiki/Util' );
class CitePage extends Page {
getReference( num ) { return $$( '#mw-content-text .reference' )[ num - 1 ]; }
getCiteMultiBacklink( num ) { return $( '.references li:nth-of-type(' + num + ') .mw-cite-up-arrow-backlink' ); }
getCiteSingleBacklink( num ) { return $( '.references li:nth-of-type(' + num + ') .mw-cite-backlink a' ); }
getCiteSubBacklink( num ) { return $( '.mw-cite-backlink sup:nth-of-type(' + num + ') a' ); }
getReference( num ) {
return $$( '#mw-content-text .reference' )[ num - 1 ];
}
getCiteMultiBacklink( num ) {
return $( '.references li:nth-of-type(' + num + ') .mw-cite-up-arrow-backlink' );
}
getCiteSingleBacklink( num ) {
return $( '.references li:nth-of-type(' + num + ') .mw-cite-backlink a' );
}
getCiteSubBacklink( num ) {
return $( '.mw-cite-backlink sup:nth-of-type(' + num + ') a' );
}
async scriptsReady() {
await Util.waitForModuleState( 'ext.cite.ux-enhancements' );