MobileFrontend uses the npm package 'pre-commit' to execute pre-commit
hooks but Popups was using 'husky'. This commit rectifies that for
consistency.
Bug: T209314
Change-Id: I56e841d6dc6739ffe040cb930ddf0ebce3905a9f
The following upgrade was made:
stylelint-config-wikimedia | 0.4.3 | 0.5.0
The upgraded version stylelint-config-wikimedia includes stylelint as a
dependency (no longer a peer dependency) [1] so our stylelint dependency was
removed.
As a result of this upgrade, several of our .less files were flagged by
the linter and corrected in this patch.
[1] https://github.com/wikimedia/stylelint-config-wikimedia/blob/v0.5.0/package.json#L36
Bug: T209314
Change-Id: Ic6d4b1caf60f4e03fa60076a2ae74d6639117f25
The following upgrade was made:
eslint-config-wikimedia | 0.8.1 | 0.9.0
The upgrade of eslint-config-wikimedia removes the need of
eslint-plugin-qunit as a peerDependency because it is now a hard
dependency [1] so it was removed in our package.json.
It appears the biggest change in the upgrade was the use of separate
profiles [2]. Given this, our root .eslintrc.json was updated to extend
from 'wikimedia/client'.
Several test files were flagged by the upgraded linter and were fixed in
this patch. Additionally, our build file was flagged for having too many
statements on one line. This rule was turned off in .eslintrc.es5.json
[1] https://github.com/wikimedia/eslint-config-wikimedia/blob/master/package.json#L48
[2] https://github.com/wikimedia/eslint-config-wikimedia/blob/master/CHANGELOG.md#090--2018-11-19
Bug: T209314
Change-Id: I29db72e77f04a327bc9c2b558c6d53849287bb80
The following upgrades were made:
bundlesize | 0.15.3 | 0.17.0
clean-webpack-plugin | 0.1.19 | 1.0.0
grunt-contrib-watch | 1.0.1 | 1.1.0
nyc | 12.0.2 | 13.1.0
These potentially breaking changes were listed for nyc (but were not
observed):
* "--hook-run-in-context, and --hook-run-in-this-context are no longer
true by default (they should be enabled if you're using a library like
requirejs)."[1]
[1] https://github.com/istanbuljs/nyc/blob/master/CHANGELOG.md#breaking-changes
Bug: T209314
Change-Id: Iaf705d4e6cdde1e3d3103f1c154a8fb172815535
Webpack's `-d` option is an alias for
`--debug --devtool cheap-module-eval-source-map --output-pathinfo`[0]
which overrode the `devtool` specified in the config. Specify
`--mode=development` which appears to be better supported than `-d`,
although the distinction is poorly documented[1]. The build products are
identical for `--mode=development --debug --output-pathinfo` and simply
`--mode=development` so the latter is used.
For consistency, replace `-p`, an alias for
`--optimize-minimize --define process.env.NODE_ENV=production`[0],
where `--optimize-minimize` is documented[2] as:
Minimize JavaScript and switches loaders to minimizing UglifyJsPlugin
and LoaderOptionsPlugin.
With `--mode=production` which is documented[3] as:
Sets process.env.NODE_ENV on DefinePlugin to value production. Enables
FlagDependencyUsagePlugin, FlagIncludedChunksPlugin,
ModuleConcatenationPlugin, NoEmitOnErrorsPlugin,
OccurrenceOrderPlugin, SideEffectsFlagPlugin and UglifyJsPlugin.
This change has already been made to MobileFrontend in c10f87d89.
[0] https://webpack.js.org/api/cli/#shortcuts
[1] https://medium.com/webpack/webpack-4-released-today-6cdb994702d4#dfa8
[2] https://webpack.js.org/api/cli/#optimize-options
[3] https://webpack.js.org/concepts/mode/#usage
Change-Id: I7a7ffc913592f0b18e091bb219a7fc75873d4d7a
FETCH_COMPLETE_TARGET_DELAY is used to introduce an artificial delay to
HTTP requests as needed. However, FETCH_START_DELAY is always accounted
for so it makes sense to define FETCH_COMPLETE_TARGET_DELAY with it. The
docs are updated to draw the distinction between total delay and API
response delay.
Change-Id: I4cddc89b8090d54db0dd85f270441cab17c54993
The project ESLint configuration unintentionally inherited unwanted
configuration from MediaWiki, which allows global jQuery usage. Cap the
project's ESLint hierarchy at the project root.
Change-Id: I5177d306feface7fcce0867c624bbcf9e74f19fc
The other messages when announcing a widget below use a ':' at the
end of line and add extra information in brackets, not on a new line.
Bug: T203992
Change-Id: Ide151e39159df01fa1c97c808bcf7ad29c671580
This is the first step, in a second after the OOUI rollout we should also
remove the paragraphs within the `label`, for appearance and HTML validation
reasons.
Bug: T203992
Change-Id: I4a12e4572ae2518079616e3765a5d3954aab794b