Commit graph

10 commits

Author SHA1 Message Date
Ed Sanders fa18975543 build: Update eslint-config-wikimedia to 0.28.0 and autofix
Change-Id: Iff4b874580768b008427c0bea535ab08cea14a36
2024-06-07 17:33:12 +01:00
Simon Legner 21438d2b22 Remove FileRepoInfo API and Repo model
Repo was only used in two locations:
1. StripeButtons.set for `isCommons` - can be replaced by `descriptionUrl.includes('//commons.wikimedia.org/')`
2. EmbedFileFormatter.getSiteLink (unused)

Furthermore:
- Simplify StripeButtons (we only have one button)
- Unwrap info objects consisting of `ImageModel` and `Repo`
- Remove unused EmbedFileFormatter.getSiteLink
- Inline EmbedFileFormatter.getCaption and EmbedFileFormatter.getLinkUrl
- Fix JSDoc type `ImageModel`

Reduces mmv bundle size from 28012 to 27246.

Bug: T77349
Change-Id: Ia4388fe4d5e1d6112a992e826453cd5799a6a4b4
2024-05-31 08:13:08 +02:00
libraryupgrader 147b576b57 build: Updating dependencies
composer:
* mediawiki/mediawiki-phan-config: 0.12.1 → 0.14.0

npm:
* eslint-config-wikimedia: 0.25.1 → 0.26.0
  The following rules are failing and were disabled:
  * resources:
    * es-x/no-resizable-and-growable-arraybuffers
  * tests/qunit:
    * es-x/no-resizable-and-growable-arraybuffers

* grunt-banana-checker: 0.11.0 → 0.11.1

Change-Id: Ief610bdadaccd2325cd1b8a2cae70b7e465d8b76
2024-02-13 02:13:29 +00:00
Fomafix 3481080251 Improve variable declarations in JavaScript
Use the eslint rule
	"no-var": "error"
in resources/.eslintrc.json and in .eslintrc.json
to require the use of `const` and `let` instead of `var`.

Bug: T337102
Change-Id: I3b3d6d426966a97c13f62494443f62bd5b790920
2023-11-06 23:11:23 +00:00
Ed Sanders 67188f8c31 eslint: Enforce max-statements-per-line
Change-Id: I416d0c951d18f2fb3b477695ab0913f75fb60a68
2023-06-28 19:12:48 +01:00
Ed Sanders a33f7e5c57 Update linters and fix issues
Change-Id: Ib562131bbb3a9940d56602e0c4dbbe810ce7358c
2023-06-28 19:12:48 +01:00
Simon Legner 5f781b7a9b Add jsdoc to MMV
This replaces the jsduck implementation that we recently removed.

Changes:
* Document events on Document element.

Bug: T337039
Change-Id: Iaa9f54c7838159a75a38eec0d49f203803aadee7
2023-06-12 22:08:14 +02:00
Simon Legner 30fad6b8b8 Use ES6 features
* classes
* arrow functions
* const/let
* string templates
* Object.assign

Bug: T337102
Change-Id: I757b9993a2feeed707fb4ad213944001498f3f6a
2023-06-12 16:45:08 +00:00
Jon Robson 00b65d02cd Remove jquery.tipsy and use OO.ui instead
Bug: T77402
Change-Id: I63328cf86872019fc9832162b26ffa8075382acd
2023-05-05 16:32:00 +00:00
Ed Sanders b03af20581 eslint: Lint Gruntile.js using server rules
Change-Id: I6f6f7391668412b2bb572a8d77da8e137fa169bb
2022-02-07 16:38:38 +00:00