Commit Graph

12 Commits

Author SHA1 Message Date
DannyS712 2c25d15489 ESLint: remove redundant disable of one-var rule
No longer needed now that we use eslint-config-wikimedia
version 0.20.0, which no longer includes that rule.

Bug: T286838
Change-Id: I44518a4cc8e9d6e4cde38899f68d7952956a266e
2021-07-17 01:38:26 +00:00
libraryupgrader f01df6f803 build: Updating eslint-config-wikimedia to 0.19.0
The following rules are failing and were disabled:
* compat/compat

Additional changes:
* eslint: Renamed `wikimedia/client` profile to `client-es5` (T277085).

Change-Id: I12c1a88cef8e2c95bed496628d2fe74d031f8278
2021-03-15 04:57:07 +00:00
libraryupgrader 659e8989ac build: Updating stylelint-config-wikimedia to 0.10.3
Additional changes:
* Removed globals `require`, `module`, included via `wikimedia/mediawiki` profile (T262222).
* Dropped the emtpy global definition in .eslintrc.json.

Change-Id: I18ea7925d42ae65c6afd49982186d9375ab9e6e3
2020-11-23 03:44:23 +00:00
Stephen Niedzielski c9d5b2e4fb [dev] [JS] Move JavaScript to package modules
Move all Vector JavaScript to ResourceLoader `packageFiles`[0] which are
much more compatible with modern development practices:

- The entrypoint is the first `packageFiles` entry (unless specified
  otherwise). All other JavaScript must be explicitly executed.

- Remove a level of indentation due to IIFEs from every JavaScript file.
  Regretfully, ESLint does not support modules except in ES6+ so the
  otherwise useful `no-implicit-globals` rule must be disable. The
  change comes with a comment so we always remember.

- IDEs and other tooling understand Node.js-like `module.exports` /
  `require()`.

This change seemed the most sensible way to start developing new
JavaScript in Vector needed by the collapsible sidebar.

[0]: https://www.mediawiki.org/wiki/ResourceLoader/Package_modules

Change-Id: I287e604d5b1055aa97b5f987c24872755757ea1a
2020-04-10 09:39:25 -06:00
Kunal Mehta b10df06c91 Use only JSON syntax in .eslintrc.json
Breaks libup otherwise.

Change-Id: Ib1aeb412939e14911e1afec29336c63ea3e8ef8a
2020-03-23 14:05:42 -07:00
Stephen Niedzielski bd7bd75569 [JavaScript] Validate types
Lift the mists of confusion by checking that all JavaScript types align.
No ignores! This is the JavaScript equivalent to Phan.

This patch adds the necessary infrastructure for verifying typing and
fixes the few flaws found.

Bug: T239262
Change-Id: I2557471421196ea46cd13dfb786a52968fbfcc97
2020-03-16 09:10:08 -06:00
Ed Sanders c61f6469db build: Update linters
Change-Id: I17a65638e0c7d074d4c1db282b278798e875fbe1
2019-10-31 21:43:20 +00:00
Ed Sanders 370f52e692 build: Update linters
Change-Id: I58969b531c70eba70a7fa7a8fc0ba1ad521ba9f5
2019-10-07 16:41:27 +01:00
Kunal Mehta 872da65bb0 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: If3491ee3453bbd7591027986a2f0b678c1a51794
2018-12-17 19:02:54 -08:00
Ed Sanders 828452ff27 build: Update eslint-config-wikimedia to 0.9.0
Change-Id: I3ea907f6ef3b6337c1e793668ae889610fc6a635
2018-11-26 23:39:36 +00:00
Ed Sanders b61ad3a9a7 Remove obsolete aliases from closures
Bug: T208951
Change-Id: I6ca9ca80473317e44a10c268c7058bc2cf4d7b58
2018-11-16 15:35:52 +00:00
James D. Forrester 9bd5ce5a1e build: Replace jshint and jscs with eslint
Change-Id: I48d542580d767df2d17ce4c6668e9e233a0f7903
2016-11-29 08:39:55 -08:00