mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-09-23 10:21:11 +00:00
Upgrade elint-config-wikimedia (drop eslint-plugin-qunit)
The following upgrade was made: eslint-config-wikimedia | 0.8.1 | 0.9.0 The upgrade of eslint-config-wikimedia removes the need of eslint-plugin-qunit as a peerDependency because it is now a hard dependency [1] so it was removed in our package.json. It appears the biggest change in the upgrade was the use of separate profiles [2]. Given this, our root .eslintrc.json was updated to extend from 'wikimedia/client'. Several test files were flagged by the upgraded linter and were fixed in this patch. Additionally, our build file was flagged for having too many statements on one line. This rule was turned off in .eslintrc.es5.json [1] https://github.com/wikimedia/eslint-config-wikimedia/blob/master/package.json#L48 [2] https://github.com/wikimedia/eslint-config-wikimedia/blob/master/CHANGELOG.md#090--2018-11-19 Bug: T209314 Change-Id: I29db72e77f04a327bc9c2b558c6d53849287bb80
This commit is contained in:
parent
1594374fe2
commit
c64497e5df
|
@ -49,6 +49,7 @@
|
|||
"new-parens": 0,
|
||||
"no-fallthrough": 0,
|
||||
"no-implicit-coercion": 0,
|
||||
"no-catch-shadow": 0
|
||||
"no-catch-shadow": 0,
|
||||
"max-statements-per-line": 0
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"root": true,
|
||||
"extends": "wikimedia",
|
||||
"extends": "wikimedia/client",
|
||||
"parserOptions": {
|
||||
"sourceType": "module",
|
||||
"ecmaVersion": "6"
|
||||
|
|
|
@ -25,8 +25,7 @@
|
|||
"babel-loader": "8.0.4",
|
||||
"bundlesize": "0.17.0",
|
||||
"clean-webpack-plugin": "1.0.0",
|
||||
"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-contrib-watch": "1.1.0",
|
||||
|
|
|
@ -14,8 +14,12 @@ const mw = mediaWiki,
|
|||
*/
|
||||
FETCH_RESOLUTION = { RESOLVE: 0, REJECT: 1 };
|
||||
|
||||
function identity( x ) { return x; }
|
||||
function constant( x ) { return () => x; }
|
||||
function identity( x ) {
|
||||
return x;
|
||||
}
|
||||
function constant( x ) {
|
||||
return () => x;
|
||||
}
|
||||
|
||||
/*
|
||||
* Integration tests for actions and state of the preview part of the system.
|
||||
|
|
|
@ -4,7 +4,9 @@ import { createStubUser } from './stubs';
|
|||
QUnit.module( 'ext.popups.preview.settingsBehavior', {
|
||||
beforeEach() {
|
||||
function newFromText( title ) {
|
||||
return { getUrl() { return `url/${ title }`; } };
|
||||
return {
|
||||
getUrl() { return `url/${ title }`; }
|
||||
};
|
||||
}
|
||||
|
||||
mediaWiki.Title = { newFromText };
|
||||
|
|
|
@ -2,8 +2,12 @@ import createSettingsDialogRenderer from '../../../src/ui/settingsDialogRenderer
|
|||
|
||||
QUnit.module( 'ext.popups/settingsDialogRenderer', {
|
||||
beforeEach() {
|
||||
function render() { return $( '<div>' ); }
|
||||
function getTemplate() { return { render }; }
|
||||
function render() {
|
||||
return $( '<div>' );
|
||||
}
|
||||
function getTemplate() {
|
||||
return { render };
|
||||
}
|
||||
|
||||
mediaWiki.html = { escape: ( str ) => str };
|
||||
mediaWiki.template = { get: getTemplate };
|
||||
|
|
Loading…
Reference in a new issue