Commit graph

76 commits

Author SHA1 Message Date
James D. Forrester 78b415cc69 build: Upgrade grunt-banana-checker to v0.3.0
So many old keys not yet removed. Oy. Also, disable disallowDuplicateTranslations
for now as this fails so much.

Change-Id: I52e1555335a6e64b1e9db541ba726cf6ce8c7dd0
2015-09-07 11:59:50 -07:00
James D. Forrester efe7270819 build: Bump grunt-contrib-jshint from 0.11.2 to 0.11.3 to fix upstream issue
Change-Id: I6215f90dd501a7bc27b47f21130567893709cc4a
2015-09-03 14:11:01 -07:00
James D. Forrester 2efec36a10 build: Bump jscs devDependency from 1.8.0 to 2.1.0
Change-Id: I75a99990c61d7f1f0a963f003c0e8bdb9c5215b6
2015-08-19 10:25:11 -07:00
Kunal Mehta f41310ab4c build: Configure jsonlint
Change-Id: I25a0010aa023bc3b70f24e9f30ffef3be88f965f
2015-06-13 01:14:38 -07:00
Kunal Mehta 852ac522d7 build: Updating development dependencies
* grunt-banana-checker: 0.2.1 → 0.2.2

Change-Id: I4bbf9709c48f22550ec8e36af11b737ebf6b92c2
2015-06-06 00:11:02 +00:00
James D. Forrester a69dcae3ab build: Bump various devDependencies
grunt-contrib-jshint:	0.11.0 -> 0.11.2
	grunt-jscs:				1.5.0 -> 1.8.0

Bug: T90816
Change-Id: I294bd46b2ce48b3839c4e6b200db08e935933379
2015-04-29 08:58:24 -07:00
Timo Tijhof f08788acf8 build: Declare grunt-cli dependency
Change-Id: I6a7fafa3c6e40d2407f07c514167ab9fc7661685
2015-04-06 16:32:58 +00:00
Timo Tijhof 1082249691 build: Move pre/post 'doc' task into package.json
Standard entry point.

Change-Id: Ic6cdc9ac1b266a64dcb1522ac36132c5ef844d3c
2015-04-06 17:18:29 +01:00
James D. Forrester 664b90bb87 build: Update grunt-banana-checker to v0.2.1
Change-Id: If3954c2a01117df036ffe89df2f37044a32f6a41
2015-03-27 16:41:56 -07:00
James D. Forrester 5db66faea9 build: Update jscs to latest
Change-Id: Ic1193d5557e0a3468c16896767888e8a593671e0
2015-03-07 04:05:44 +00:00
James D. Forrester bed038b509 build: Bump devDependencies to latest
Updates:
* grunt-contrib-csslint  0.3.1  ->  0.4.0
* grunt-contrib-jslint   0.10.0 -> 0.11.0
* grunt-jscs             0.8.1  ->  1.2.0

For jscs, leaving requireSpacesInsideArrayBrackets to avoid headaches for now.

Change-Id: I62d34444edbba65c8bd22d2fa5e50e16cabb0042
2015-02-02 14:30:39 -08:00
James D. Forrester 12f183a20c build: Update grunt-jscs devDependency to latest
grunt-jscs: 0.7.1 -> 0.8.1

No-op; note that this switches us from jscs 1.6.0 to 1.7.2, which provides
some new options (unused in the Wikimedia preset).

Change-Id: I1d0db2568ff673ff8b8bba9549b06c005eb7186b
2014-11-17 19:50:46 -08:00
Timo Tijhof 8ddf622891 build: Remove 'repository' and 'licenses' key from package.json
This isn't a node.js package, but simply the packages for the
workflow in developing the extension.

This repo already has other entry points and outings for this
information.

Change-Id: Ide13e863546e6efda61086e3daf9cdfe4ed5f1ac
2014-10-11 02:59:33 +02:00
James D. Forrester 198c240fcc build: Bump miscellaneous devDependencies to latest
Updates:
* grunt                  0.4.2 -> 0.4.5
* grunt-banana-checker   0.1.0 -> 0.2.0
* grunt-contrib-csslint  0.2.0 -> 0.3.1
* grunt-jscs             0.6.1 -> 0.7.1

Change-Id: If1d612cd4ad9b45b0d249931339882f4bc238c74
2014-09-13 23:40:06 -07:00
James D. Forrester 8cc3451be7 build: Update grunt-jscs (formerly grunt-jscs-checker) from 0.6.0 to 0.6.1
Change-Id: I097d63cea436ab6ef2a16fccead10b72103d0b6e
2014-07-18 13:21:27 -07:00
Timo Tijhof 19afd65a08 build: Update jscs and use new "wikimedia" preset
Our coding style has been upstreamed and first released
in node-jscs v1.5.0 (grunt-jscs-checker v0.6.0).

Change-Id: Ifc0cfc7177946b9d11407f60e38b0177883724c5
2014-06-26 17:00:15 +00:00
Timo Tijhof 0c60733ec5 Grunt: Clean up
* Use jshintrc:true which lets grunt defer autodiscovery of the file
  to jshint instead of forcing it to '.jshintrc'. This allows us to
  override certain settings from a subdirectory, to match behaviour
  of standalone jshint.

* Sort modules.

* Use plain string instead of single-value array.

Change-Id: Ib5cd48f3ff0367b8fc84627c29e4fb32452087c0
2014-06-04 05:07:12 +02:00
Timo Tijhof 25d00cc777 build: Update jscs and jshint
jshint:
* Update to grunt-contrib-jshint v0.10.0 (jshint v2.5.0).
* Remove coding style options covered by jscs.
* Enable new option "freeze" (prohibits changing native prototypes).
  http://www.jshint.com/blog/new-in-jshint-oct-2013/#option-freeze
* Re-order to match http://www.jshint.com/docs/options/

jscs:
* Update to grunt-jscs-checker v0.4.4 (jscs v1.4.5).
* Format .jscsrc file in a more spacious way and order the
  properties less arbitrarily (using the jscs's readme order).
* Enforce more details of our coding style
* Get rid of the unsable "sticky" operator rules which have been
  deprecated in favour of using other rules instead that are able
  to enforce this more accurately.
  - disallowLeftStickedOperators: Remove deprecated rule.
    * Ternary covered by requireSpacesInConditionalExpression.
    * Rest covered by requireSpace{Before,After}BinaryOperators.

  - requireLeftStickedOperators: Remove deprecated rule.
     * Comma covered by disallowSpaceBeforeBinaryOperators.

  - requireRightStickedOperators: Remove deprecated rule.
    * Logical not (!) covered by disallowSpaceAfterPrefixUnaryOperators.

See also If46b94ce1, Ib731f11b1 and I0b0cadbc5 in oojs/core.

Also:
* Update grunt-contrib-watch to latest upstream version.
  Change log at https://github.com/gruntjs/grunt-contrib-watch/blob/v0.6.1/CHANGELOG#L1-L17

Change-Id: I6c5a34afea8b05a3dca617897c192594df06ca90
2014-05-15 16:52:34 +00:00
James D. Forrester 0ee4ba5d11 Use new banana checker as a linter to avoid lacking qqq messages
Change-Id: I02647d519ff85f78178d4fb48f014081ca3e82ef
2014-04-04 15:22:57 -07:00
James D. Forrester bf9f17d9b9 Bump jscs to 0.4.1
Change-Id: I12f65f48ea86b2496de295be1b61d69d3c727d2a
2014-04-01 14:39:03 -07:00
Roan Kattouw ee743f869d Use submodule for VisualEditor core
* Add lib/ve.
* Remove modules provided by VisualEditor core.
* Update paths.
* Remove VisualEditor core specific things from Gruntfile.
* Remove entries from external.js already in lib/ve/.docs/external.js.
* Implement build script to compose a jsduck index that includes
  all of VisualEditor core. Right now it includes VisualEditor's
  index as-is, and because those patterns (e.g. ve.dm.*Node) will
  also MW subclasses this means our category page will include
  MW classes under "VisualEditor (core)" (before the repo split,
  this was intentional).
  This is inevitable unless we list every class individually, or
  (the plan) until we move the MW subclasses out of the ve.*
  namespace and into mw.* somewhere.

Bug: 45342
Change-Id: Iff45cd555430634c9fc341fd3b177c1e0625300b
2013-12-20 09:18:41 +00:00
Timo Tijhof 17cbdd3cb4 grunt: Update devDependencies
Change-Id: I0076d07e2029039283984dd2ae0b0e775b3e00c0
2013-12-18 08:19:19 +01:00
Timo Tijhof 561dd7c65b grunt: Update grunt-contrib-jshint use built-in jshintrc parser
Use built-in jshintrc option for 'jshint' config instead of
parsing manually and strippig comments.

node-jshint itself has supported comment parsing for a long time
(which is why our Jenkins build, which doesn't even use grunt,
has no problem with our .jshintrc file).

But the grunt task never exposed this parser, until v0.6.4.

Change-Id: Ia45a44ac49c943845a11d3fc7a0127776e99ed2a
2013-12-18 06:33:20 +00:00
Timo Tijhof cf7f2b141d Set up node-jscs, pass it, and configure in local Gruntfile
Let's experiment with this via our local Gruntfile. If it works
fine we can install it in Jenkins (similar to node-csslint).

Verify through $ npm install && npm test;

Fixed all outstanding violations.

Also:
* Added syntaxhighight to ignore.
* Added imetests (which contain unformatted JSON) to ignore.
* In ve.dm.ModelRegistry#matchTypeRegExps, removed redundant
  !! cast from the [+!!withFunc] statement which was hitting
  a bug in node-jscs. All callers to this local private function
  pass a literal boolean true/false so no need to cast it.
* Removed "/* key .. , value */" from ve.setProp, though this
  wasn't caught by node-jscs, found it when searching for " , ".
* Made npm.devDependencies fixed instead of using tilde-ranges.
  This too often leads to strange bugs or sudden changes. Fixed
  them at the version they were currently ranging to.

Bug: 54218
Change-Id: Ib2630806f3946874c8b01e58cf171df83a28da29
2013-12-06 10:37:27 -08:00
C. Scott Ananian 5f392ccec1 Updates to README.md and CODING.md
Describe how to report bugs, install grunt, and run tests.

Update jsduck instructions.

Fix path to license file in package.json.

Change-Id: I276ff0ea4324f027dafc044a86fa564b2439089a
2013-09-17 19:09:25 -04:00
Timo Tijhof bedbebd53c Implement Grunt support (grunt jshint,csslint,qunit,watch)
This has no influence on Jenkins but can be used locally to
easily run certain tools. Since we already had `.jshintrc` in
our repo it was already possible to easily run JSHint from
the command-line locally. Taking that as a base the following
are new features:
* `grunt csslint`: Runs CSSLint on all css files
* `grunt qunit`: Runs QUnit (standalone) tests in PhantomJS
* `grunt test`: Runs jshint/csslint/qunit
* `grunt watch`: Runs the "test" command automatically whenever
  a file is changed. You can keep this in the background so
  whenever you save a file in your editor (e.g. Sublime Text)
  it'll run the tests and if there is a failure, it'll throw a
  bash error code causing your Terminal application to beep you
  in whatever way your operating system does so (e.g. for
  Mac OS X a red badge + jumping icon in the Dock). It will
  continue to run in the background even after a failure so no
  need to re-start watch after a failure.
* `grunt`: Runs the default task, which is 'test'.

Previously to use `jshint .` you had to:
* One-time install:
  * install package -- nodejs npm
  * npm install -g jshint
* Usage:
  * cd VisualEditor; jshint .

Now, for grunt:
* One-time install:
  * install package -- nodejs npm
  * npm install -g grunt-cli
  * cd VisualEditor; npm install
* Usage:
  * cd VisualEditor; grunt

Change-Id: I7a4fdf4b6bf3f00cef15dc3e2c81eceb595aec7c
2013-06-05 11:10:23 +00:00