Commit graph

18 commits

Author SHA1 Message Date
libraryupgrader f5de8ee108 build: Updating npm dependencies
* eslint-config-wikimedia: 0.27.0 → 0.28.0
  The following rules are failing and were disabled:
  * modules:
    * no-mixed-spaces-and-tabs
    * no-jquery/no-extend
    * implicit-arrow-linebreak
  * tests/qunit:
    * no-jquery/no-extend

* grunt-stylelint: 0.19.0 → 0.20.0
* stylelint-config-wikimedia: 0.16.1 → 0.17.1

Change-Id: I3fd3c4a2cbb03d3aa4c8efb658e33d14d24cd518
2024-06-08 12:04:26 +00:00
thiemowmde 363f24a409 Remove dead code from HelpDialog test
There are not even any <a> elements involved because the language is
set to qqx.

Change-Id: I64a6c414ccb327bc65a606ebd1579b579cd3215a
2024-04-29 11:59:14 +02:00
Fomafix c930a7a88e Use .parseDom() from mediawiki.jqueryMsg instead of .parse()
This generates the DOM elements directly instead of generating and
parsing HTML.

Also move the dependency on module 'mediawiki.jqueryMsg' from module
'ext.RevisionSlider.init' to module 'ext.RevisionSlider.Slider'.

Change-Id: I3a93b942e08ff7453e2b940c7f3e896f90679d0d
2024-04-26 14:14:01 +00:00
Adam Wight b900446572 Migrate JS to ES6
Reintroduces IIFE closures in test files because variables were
declared in the global namespace, and "const" now causes hard errors.

Bug: T339323
Change-Id: I69e9d7a29591137f185f3e5ab02dea590ec4dff6
2023-06-23 08:01:31 +02:00
Fomafix 65d1dfefbf Use document.body instead of 'body' as jQuery selector
Change-Id: I2e74d31b61f5f46d1bbb1a0283a7468af9c4e856
2023-04-21 08:52:25 +00:00
Thiemo Kreuz 1407e0a90d Merge ….HelpDialog ResourceLoader module away
It's never used in another context but together with the
….Slider module as well as the ….init module. The ….init
module continues to require the ….Slider module, so all
dependencies are still met.

Motivated by the confusion about the two types of require()
introduced in Idf1cc79.

Bug: T233279
Change-Id: I4b4ef69f3074d57f884763c092a515ce976daaef
2021-12-16 16:45:41 +01:00
Thiemo Kreuz 4ac1ff57f1 Remove closure wrappers from all JavaScript code
These are not needed any more, because the code runs in a
seperate scope anyway.

Change-Id: I939a06102f194a0c98021accb2f62be73dd0562f
2020-11-18 11:16:04 +01:00
Adam Wight c9958c5edd Migrate HelpDialog to packageFiles
FIXME: Reusing HelpDialog as a module entrypoint creates a circular
reference.  It's harmless because the dependencies are added at
different times, but also easy to refactor away.

Change-Id: I3608a78baddf2376cc9eb4524625f4911c130c06
2020-04-05 01:50:48 +02:00
Ed Sanders e62f46dd80 Remove obsolete aliases from closures
Bug: T208951
Change-Id: Icf10ea6bbc09542e69c0cd583a4ee4f2f76a3f43
2018-11-16 16:33:52 +00:00
Ed Sanders 351bdcfae7 build: Update linters
Change-Id: If21c9dbeba945d54c6bcf9b6e4edd586c5b411ca
2018-09-13 21:58:39 +01:00
jenkins-bot ac5e6de6f4 Merge "Add jQuery reference to modules using it" 2017-07-06 14:31:29 +00:00
WMDE-Fisch edfd885543 Remove last SliderViewTwo parts
Bug: T165747
Change-Id: I9ac410613361e567bd825f096eb12bbb3edc5cde
2017-07-05 10:22:33 +02:00
WMDE-Fisch 64bf845aef Add jQuery reference to modules using it
Change-Id: Icf5ff3459978b7c7a5fa8e24b42981e789bcc492
2017-06-29 10:14:27 +02:00
Leszek Manicki 8e7fe2434d Add eslint, to be used instead of jscs and/or jshint
First I jumped on replacing both jscs and jshint with eslint but
it might be premature decision. Although linting with eslint
is possible (like in there is wikimedia config for eslint)
it is still not clear should it

But in case the change happens we will be ready.

Apart from config stuff this changes few bits spotted by eslint:
improves some indentation, removes weird spaces, completes some
doc blocks, changes IIFE forms in tests. These changes do not
seem controversial.

Change-Id: I9f8bf0f5745da8e662685f4cd879ea4baa609c01
2016-09-05 09:47:11 +02:00
Leszek Manicki 8d91433b61 Open links in the "tutorial" in the new window
In particular, link to a Meta page on the related community wish
should open in the new window/tab.

Bug: T140875
Change-Id: Ib0d7bf679c9ac8a3ee2fdf2289fc53cfdfdaa671
2016-07-20 12:28:20 +02:00
Ed Sanders a5f36af0f3 Prefix all classes and IDs with mw-revslider
Bug: T139105
Change-Id: Ia92396ec4f8acea39398173c81842d66257dc519
2016-07-01 11:27:23 +01:00
Ed Sanders cdd4a6bd83 Fix linting path for test files and make a pass
Change-Id: Iee023c901d6e87c6d23ce78a57c16c73d90e3efb
2016-07-01 11:26:18 +01:00
WMDE-Fisch f7ae734b99 Add more QUnit tests for public methods
Added tests for DiffPage, HelpDialog and RevisionListView.
Slightly refactored RevisionListView to improve testability.

Bug:T137964
Change-Id: I07dc8059d5a90bdd6623fd7748d36ba212763e15
2016-06-30 17:01:10 +02:00