Commit graph

31 commits

Author SHA1 Message Date
libraryupgrader e28310371f build: Updating npm dependencies
* wdio-mediawiki: 1.1.1 → 1.2.0
* ansi-regex: 5.0.0 → 5.0.1
  * https://github.com/advisories/GHSA-93q8-gq69-wqmw
* json-schema: 0.2.3 → 0.4.0
  * https://github.com/advisories/GHSA-896r-f27r-55mw
* jsprim: 1.4.1 → 1.4.2
  * https://github.com/advisories/GHSA-896r-f27r-55mw
* meow: 3.7.0 → 3.7.0
  * https://github.com/advisories/GHSA-7p7h-4mm5-852v
* node-fetch: 2.6.2 → 2.6.7
  * https://github.com/advisories/GHSA-r683-j2x4-v87g
* optipng-bin: 6.0.0 → 6.0.0
  * https://github.com/advisories/GHSA-44c6-4v22-4mhx
* string-width: 4.2.3 → 4.2.3
  * https://github.com/advisories/GHSA-93q8-gq69-wqmw
* strip-ansi: 6.0.1 → 6.0.1
  * https://github.com/advisories/GHSA-93q8-gq69-wqmw
* sugarss: 2.0.0 → 2.0.0
  * https://github.com/advisories/GHSA-566m-qj78-rww5
* trim-newlines: 1.0.0 → 1.0.0
  * https://github.com/advisories/GHSA-7p7h-4mm5-852v
* validator: 13.6.0 → 13.7.0
  * https://github.com/advisories/GHSA-qgmg-gppg-76g5
  * https://github.com/advisories/GHSA-xx4c-jj58-r7x6
* zopflipng-bin: 5.0.0 → 5.0.0
  * https://github.com/advisories/GHSA-44c6-4v22-4mhx

Change-Id: Idee4aef18cbc4d5ec29d28385081fc0c89ecd50c
2022-02-01 06:57:37 +00:00
Ed Sanders 2098292318 Use no-jquery/no-html to warn against writing HTML strings to the DOM
This forces us to comment when we are doing this deliberately.

Change-Id: Ide1bcb64f6c6076b48e88f1f27045bd93392f8a0
2021-12-16 01:28:42 +00:00
Ed Sanders 4d13a4f4ed eslint: Enable no-jquery/no-append-html
Prevents accidentally treating plain text or user input
as HTML, which could be an XSS vulnerability.

Change-Id: Id4af48447a0907962a57340cb60aca08df9cc505
2021-12-16 02:04:11 +01:00
Ed Sanders 86c405a2e1 Prefere ve.extendObject over $.extend
Change-Id: I37fef45701653cef08de9ec699865aa4fdf477bc
2021-11-15 21:30:19 +00:00
Esanders aaf27e3901 Revert "build: Remove max-len over-ride (leave as warning)"
This reverts commit 2c75722ff1.

Reason for revert: Creates too much warning spam (>50) which makes
errors hard to spot. Most of these should be fixed before enforcing
the rule.

Change-Id: I8a785ec73d3429d4681d5c965a0efdbf0c86893d
2021-10-13 12:54:46 +00:00
James D. Forrester 2c75722ff1 build: Remove max-len over-ride (leave as warning)
Change-Id: I3356c4ddcf355021d10c251d79935acdc8043975
2021-06-28 11:30:06 +01:00
libraryupgrader 821fb74c1b build: Updating eslint-config-wikimedia to 0.19.0
Additional changes:
* eslint: Renamed `wikimedia/client` profile to `client-es5` (T277085).

Change-Id: I6d406d9020ce243aabc87c921ec23574267a3f78
2021-03-10 23:20:16 +00:00
libraryupgrader 7248ad6332 build: Updating mediawiki/mediawiki-codesniffer to 32.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate
* MediaWiki.Commenting.PropertyDocumentation.WrongStyle
* MediaWiki.Usage.ExtendClassUsage.FunctionConfigUsage

Additional changes:
* Removed globals `OO`, `require`, included via `wikimedia/mediawiki` profile (T262222).

Change-Id: If161f46db0a1f35126fecec141e29d15fa4f2532
2020-10-28 17:50:11 +00:00
Ed Sanders 013b7419bf build: Update eslint-config-wikimedia to 0.16.2
Use jsduck config

Change-Id: I5cd7bbcee83b0fa148b8fb8c3b4adcf08f96cefc
2020-06-18 19:16:52 +01:00
Ed Sanders 651756c4fc eslint: Enable the mediawiki/class-doc rule and make pass
Also minor other adjustments

Change-Id: I9ee48359e3e53799f2f6240e44b53972283ce328
2020-04-17 22:59:11 +01:00
libraryupgrader d1efaac5b2 build: Updating npm dependencies
* eslint-config-wikimedia: 0.15.0 → 0.15.3
  The following rules are failing and were disabled:
  * mediawiki/class-doc
  * mediawiki/valid-package-file-require

* grunt-banana-checker: 0.8.1 → 0.9.0
* grunt-stylelint: 0.14.0 → 0.15.0
* stylelint-config-wikimedia: 0.9.0 → 0.10.1

Change-Id: If718fe8876cc4721602757d38fe06ab421ce8d80
2020-04-16 22:55:11 +00:00
Ed Sanders 4c86c54e46 Replace $.when with ve.promiseAll
Add linting guards, except in preinit

Change-Id: I999641eddb0e0f5b112ec2259dbafc1e816e3437
2019-11-04 22:06:54 +08:00
Ed Sanders ffa3742ce1 build: Update linters
Change-Id: I03d1a8e63b730ad98ec07ad5f630ba82698de5be
2019-11-01 16:20:22 +00:00
Ed Sanders fd43701de2 eslint: Remove unused prefer-template rule; use proper globals values
Change-Id: If98be563304baa46a746d78c94dd8945f94d545c
2019-10-07 17:22:24 +00:00
James D. Forrester 05fb44ae56 build: Upgrade eslint-config-wikimedia from 0.12.0 to 0.13.1
Change-Id: I43f407da92f59a8bf758cc2586e84aa5e18d9ab0
2019-08-02 09:51:07 -07:00
Ed Sanders 0db4ae6e00 eslint: Enable valid-jsdoc
Change-Id: Ia0d1e57246a1c567d73022ceca9b8c02850f9bc8
2019-04-17 17:13:39 +01:00
Ed Sanders 332aa1f3d2 build: Update eslint-config-wikimedia to 0.11.0
Change-Id: I5a294705eed1760e2d4dde33934d2ffb12e29525
2019-02-20 20:23:43 +00:00
Kunal Mehta d10ddac1ad build: Set "root": true, in .eslintrc.json
This ensures that each repository's "npm test" command is fully
independent of wherever it might be in the filesystem.

Bug: T206485
Change-Id: I3e0cac523ed19d654aba0049848aad2aa63fb65e
2018-12-17 18:59:43 -08:00
Ed Sanders 5801273cbb Enable jquery/no-(show/hide/toggle) rules
Change-Id: I1ab177467fb9e8d0319c02d7770704b16456751d
2018-11-30 12:27:29 +00:00
Ed Sanders 7dafd87829 eslint: Drop 'dot-notation' rule
Also upstreamed max-statements-per-line

Bug: T210552
Change-Id: Iea5036d5acab8dba46b573ee58da901169b5ab95
2018-11-27 22:41:53 +00:00
Ed Sanders 1a3e8a958c build: Use eslint-config-wikimedia v0.9.0 and make pass
Change-Id: Idb57fc12e7822cf17e10dbb726480fc7de0ae199
2018-11-21 16:51:20 +00:00
Bartosz Dziewoński e7fd1ac847 .eslintrc: Enable and fix "max-statements-per-line": 1
I am surprised this was disabled. I investigated this after reviewing
some code by a new contributor which I was certain should have failed
the lint check, but passed.

Change-Id: I5b3c837b8ca3292f6e268b3922443bd9587eadbe
2018-10-30 00:19:16 +01:00
James D. Forrester 3c6ca93b92 build: Enable and make pass no-prototype-builtins
Including a spectacular whoops in MWGalleryDialog.

Change-Id: Id9863f6dc3701cb0df6684380fa5ecac4526d37d
2018-07-06 10:58:18 -07:00
James D. Forrester ceab9e6510 build: Bump linters for eslint 5 and make pass
Change-Id: I88627028e5806c2fdceb76fd26bcb57d44ed4c20
2018-07-06 10:58:18 -07:00
Ed Sanders 7dbc4c7140 eslint: Move qunit env flag to test config
Change-Id: I290c436b25e306a3657324304ded08011ffcea7a
2018-06-05 21:12:56 +01:00
Timo Tijhof a9ce695f75 mw.DesktopArticleTarget: Use require() for mw.page.watch
Add 'require' to eslint global whitelist for this extension,
since ResourceLoader provides this in all contexts now.

Bug: T166254
Depends-On: I0e6a95bd4fbaba06eae5137ac7af84f62bebf6f0
Change-Id: I6b2fe57317dcff18ec6d9ea0cd9e4eb9c894c169
2017-05-24 21:17:02 +00:00
Ed Sanders 2d0e580c56 eslint: Remove duplicate rule (no-alert)
Change-Id: I040689ddf8fa67c89f8b7bf154be8c1ceff2e5b8
2017-04-29 12:21:40 +01:00
Ed Sanders 37ccaca2ec eslint: Re-enable wrap-iife and partially enable dot-notation
Change-Id: I4420d66f528dcb18ebe2b9f63996661b2969f833
2016-11-12 14:43:43 +00:00
Ed Sanders 6f8e0d9699 Replace confirm with OO.ui.confirm
Also enable no-alert eslint rule to prevent alert/confirm/prompt
being used in the future.

Change-Id: I2851e1f58c1861f75dbb20192e5cf6c343da75db
2016-11-11 13:13:58 +00:00
Ed Sanders e655880d14 eslint: Remove unused exception and fix documentation errors
Don't enable valid-jsdoc yet though, due to @chainable bug.

Change-Id: I4d2a6de19c72c6e4c20733446616d8046419d431
2016-10-28 12:02:36 -07:00
James D. Forrester 36befda61c build: Replace jscs and jshint with eslint
It's new, it's fresh, it's amazing, it's here.

Change-Id: I5dc784411f704685ed5cc763a2b2b1c5d3e5a610
2016-10-28 18:33:15 +00:00