On my machine `npm test` fails with a lot of ESLint errors for files in vendor folder. I guess mediawiki-vagrant creates the folder.
Change-Id: I5466ad8c490b39bef9a31f5442fecd2d11895b80
Depends-On: Ib7f0bd15dd0a9255e1e5140907e800478b658b92
* Move across all files
* Rename ext-card- prefix to ext-related-articles- prefix
** Since all code using these prefixes is JS
we do not have to worry about cached HTML
Bug: T137021
Change-Id: I784fd132c36329fa0dcc49fe2804460061940347
We're going to want to use a newer version of JSHint
anyway to support use of ES6 in our browser tests so now
seems a good time to do this.
Bug: T149202
Change-Id: I5526b020cfc12c0e065ad15ed711a0e3a7bff1bc
* Remove file pattern whitelist for JSHint and JSCS. Instead,
use the ignore list (which we need to specify anyway to avoid
errors when using IDE plugins and/or running these from the
command-line directly.
* Remove redundant '*.json' pattern for banana. '**/*.json' covers
this already as '**' is recursive from the current directory,
otherwise it would be '*/**'.
* Remove redundant 'name' and 'version' property. These were likely
added to suppress warnings by npm-install. However those warnings
are intended for packages published to npmjs.org. For local build
tools, adding private:true also suppress these warnings. For
extensions, name and versions are already maintained in other files
such as extension.json and others.
* Remove redundant '$' entry in jshintrc. There's no need to tolerate
use of global variable '$'. The convention is to use 'jQuery' and
alias it locally, which this extension already does everywhere.
* Set 'jQuery' to false instead of true in jshint globals. True
means it allows and expects this package to assign or expose
the 'jQuery' identifier. However that is not the case. If this
code overwrites jQuery, that should probably trigger a warning,
thus set to false, which means read-only global.
Change-Id: I0b159b6d684f67933e0dae506db1eb3800a6f192
Changes:
* Extend the definition of all JavaScript files to include those in the
tests directory
* Run JSHint and JSCS against all JavaScript files
* Fix the existing code style errors in the RelatedPagesGateway
test
Change-Id: Ia6d8fa63e0b86760857d4480a0575b57512fa36b