Commit graph

15 commits

Author SHA1 Message Date
Kunal Mehta 1faf4d2a0d build: Remove maxWarnings: 0 from eslint configuration
This interferes with LibUp's ability to automatically downgrade newly failing
errors to warnings and is a deviation from the settings we typically use.

Bug: T263922
Change-Id: Ia76b2ade0de6b0d8971f209432ac93bd14b3a5ff
2020-12-28 22:26:50 -08:00
Ed Sanders 1cea342431 build: Update eslint-config-wikimedia to 0.17.0
Change-Id: I0b917095bc84ff8b3a745f2d8b1e8541b9817bc8
2020-09-16 13:48:53 +00:00
jdlrobson 7408d87465 Run bundlesize tests on every commit
It was added in 7340485014
but for some reason never enabled.

This was supposed to be protecting us from performance regressions
by monitoring the size of modules in the repo. It appears to be
broken both locally and on Jenkins when run on the due to some changes
in Phabricator.

Since then we've added bundle size tests to Vector using a different
more foolproof method. I think that method is more preferable as it
also provides coverage for JS and icons so the
associated script is copied over and used in Minerva
and activated on all commits.

Bug: T259080
Change-Id: I9ba2dcc060ec09d91814c947d5be3f71b055a66e
2020-07-28 23:43:38 +00:00
libraryupgrader b8cfba1bab build: Updating markdown-to-jsx to 6.11.4
* https://npmjs.com/advisories/1219

Additional changes:
* Also sorted "composer fix" command to run phpcbf last.
* Removing manual reportUnusedDisableDirectives for eslint.

Change-Id: I2ee33d128567067e48c1dbe5f78c254a4cba82e4
2020-06-12 11:31:40 +00:00
Ed Sanders a32999e641 build: Update eslint-config-wikimedia to 0.16.0
Change-Id: Icabf6e065ed5685207731262db72faf848a0a04d
2020-06-04 08:39:32 -07:00
Nicholas Ray 46ab5b9c36 Prevent our 'no-restricted-properties' from clobbering eslint-config-wikimedia
Our eslintrc extends from 'wikimedia/client' which includes a
'no-restricted-properties' ruleset from the 'not-es5.js' file [1].

However, we were also including our own 'no-restricted-properties'
rules.

ESLint handle this duplication by clobbering instead of merging
so eslint-config-wikimedia's no-restricted-properties where not taking
effect and we were losing out on some guards against using es6.

This commit corrects that and makes both no-restricted-properties
rulesets merge instead of clobber as already done in MobileFrontend [2]

[1] 07320f16ae/language/not-es5.js (L5)
[2] https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/.eslintshared.js

Bug: T239269
Change-Id: Ibc2c144be51719d71a4c1d5828486253a5d4bf5d
2020-02-11 17:04:14 -07:00
Ed Sanders 8e579c373b build: Update linters
Change-Id: Ie0983466ad0eed0a30d62f28b10efebd0f2eacba
2019-09-17 14:21:30 +01:00
James D. Forrester 7eabe08806 build: Upgrade eslint-config-wikimedia 0.12.0, drop grunt-jsonlint
Bug: T220036
Change-Id: Ia081ff5429547cf1c7e6d6e8b0cae94e8ca3e0ba
2019-05-06 13:52:00 -07:00
Umherirrender c14f7488b3 build: Run stylelint also for css
Since I9bff880de792da756f14726042df0a0df4139d1b

Change-Id: I7a6625c53a26cb59518fab304b989fbd36273bc1
2019-02-16 15:28:41 +01:00
Stephen Niedzielski eead7c9382 Hygiene: improve ESLint config
- Enable ESLint caching with `--cache` which presumably improves
  performance.

- Forbid warnings by setting `--max-warnings` to zero. Code containing
  warnings should not be committed. However, warnings are still an
  exceptionally useful distinction to make from errors during
  development. When hacking, we do not care if a comment exceeds the
  maximum line length or if a trailing space is present but we do oh so
  very much care if the linter detects a likely programming error such
  as forgetting to initialize a constant. The former is a warning and
  the latter is an error.

- Forbid unused lint directives by enabling
  `--report-unused-disable-directives`. This setting prevents outdated
  ESLint error waivers from littering the code.

There is a related pull request to move these settings to defaults in
eslint-config-wikimedia itself:

https://github.com/wikimedia/eslint-config-wikimedia/pull/82/files#diff-46af3d30ba7affc4adf37ef4c5382c39

Change-Id: If3c99ff7309eafb1ebefa4c4b451299b45db4e60
2018-09-17 23:35:24 +00:00
Ed Sanders 04a2b27d7f build: Update linters
This exposes two broken tests:

* #setCount (Eastern Arabic numerals)
* clicking on the product of createBanner() should trigger a custom event

that were previously passing due to buggy assertions.

Change-Id: If18ad1ff9363fff65d3e347c01ce4bc0669b2a0e
2018-09-11 13:42:11 -07:00
James D. Forrester c87cbc7474 build: Organise Gruntfile.js more consistently
This also adds linting for skinStyles, with a few fixes to make these pass.

Change-Id: Id26b0bad21850d985eaaceda24fa50ad6f886458
2017-10-31 14:41:25 -07:00
Umherirrender 501b11b478 Use json extension for .stylelintrc
Bug: T173516
Change-Id: If1db630be39bdddc5f7921a49bbb7d2b16a8900b
2017-08-19 06:46:12 +00:00
Umherirrender 211a54b568 Update and run existing stylelint
stylelint is part of config, but not run by default
Also update to 0.4.1, it is the current default in many wmf extensions

Change-Id: I55f81489182628c088e362e081417514e252e6d6
2017-07-19 20:31:24 +00:00
jdlrobson 2a70a13b69 Add scaffolding for skin
Change-Id: Ie9420dc85f658fa21a1524dca9374cb1e14fcad7
2017-06-01 10:17:24 -07:00