Commit graph

89 commits

Author SHA1 Message Date
Ed Sanders 7b8931193a Update stylelint config version and make a pass
Change-Id: I58007c3976019c8cfe96fd1fc0474d9e80f99f64
2016-05-24 13:41:13 +01:00
James D. Forrester 94fcafb684 build: Bump grunt-stylelint to v0.3.0
Change-Id: I8e6eb487a1ae181c9279aaf2c0aec5cccc8d9427
2016-05-19 19:04:10 +01:00
James D. Forrester 8c7ed92288 Update VE core submodule to master (eeaf1e2)
New changes:
c54a48a build: Fix watch list (csslint -> stylelint)
58ba3d9 Add stylelint rules for @-rules
3f8c75a Stylelint: Add rule for unsupported browser features
3b96ff3 Fix minimum Opera version (15 -> 12)
9a1110b Stylelint: No ID selectors
9800bb8 build: Remove remaining references to csslint
b6ab14a stylelint: Re-enable features by names
6cc1f3c Move stylelint to npm
1d15fa0 build: Bump stylelint version to v0.2.0
ccc1724 stylelint: Use the preset rather than extending

Change-Id: I22fa8098592338a5e912aba9ad21131b21d9c0ea
2016-05-18 07:06:53 +01:00
Ed Sanders 1dc780bcbd build: Use grunt-stylelint from npm
Add .stylelintrc as a symlink

Change-Id: I3c6d3f7f988f59b12655627e67ffb61fc7f882cd
2016-05-17 16:24:39 +01:00
Ed Sanders 99d3320573 build: Replace csslint with stylelint
For now just use the rules file in lib/ve, but eventually
this will be a preset.

Change-Id: I7fd79d3e1dce37aef066d416cd969e5fff1e962f
Depends-On: I17e0d23ddfedf64985495ab35d113ea08c03b1df
2016-05-16 22:30:49 +01:00
James D. Forrester 5308a47e96 build: Bump various devDependencies to latest
grunt                  0.4.5  →  1.0.1
 grunt-cli             0.1.13  →  1.2.0
 grunt-banana-checker   0.4.0  →  0.5.0

Change-Id: Idcd66807d03c85005ca97f5563251e814d15813b
2016-04-19 01:37:25 +00:00
James D. Forrester 8ee5c6f818 build: Bump devDependencies to latest
grunt-contrib-watch  0.6.1  →  1.0.0

Change-Id: Ieea149cd930e470ec7f63e7c5cc75aef60a5a271
2016-03-17 19:42:41 +00:00
James D. Forrester ee9e6cb20e build: Bump all devDependencies to latest
* grunt-contrib-copy: 0.8.2 -> 1.0.0
* grunt-contrib-csslint: 0.5.0 -> 1.0.0
* grunt-contrib-jshint: 0.12.0 -> 1.0.0
* grunt-jscs: 2.7.0 -> 2.8.0

Change-Id: I8c4b3e1ad4e10217e9e048eacd8dedc8fe5caf02
2016-03-10 08:19:48 -08:00
James D. Forrester e6e492efc6 build: Bump various devDeps to latest and make pass
* grunt-contrib-jshint: 0.11.3 -> 0.12.0
  This version of the linter cleans up a number of options. 'es5' is now assumed to be
  true by default, and replaced as 'esversion'; 'latedef' is extended to also cover
  functions' defintions, disabled for us for now; 'futurehostile' is introduced to aid
  future-incompatible names for ES6+ support.

  I adjusted ve.init.mw.DesktopArticleTarget.init.js based on this, as this file is
  meant to be loaded by all JS-capable clients to determine if it is (amongst other
  things) capable of ES5, so now we assert ES3 compatibility via jshint.

* grunt-jscs: 2.5.0 -> 2.7.0
  Minor version bump that doesn't affect us.

* grunt-jsonlint: 1.0.6 -> 1.0.7
  Trivial version bump that doesn't affect us.

Change-Id: Ieb7b6748b0cecf275cfc284fc66617189372461f
2016-02-07 19:41:21 -08:00
James D. Forrester 90045db7a3 build: Update various devDependencies to latest
* grunt-contrib-copy     : 0.8.0 -> 0.8.2
* grunt-jsonlint         : 1.0.4 -> 1.0.6
* grunt-jscs             : 2.1.0 -> 2.5.0

Change-Id: Ia66996d4ccf48bb8baab792fda5cd67863b31575
2015-12-11 12:59:17 -08:00
James D. Forrester fe8a9eff91 build: Add grunt-tyops
Change-Id: Idb30814e69356eb2b3282fae018c142295df922f
2015-12-09 00:53:34 +00:00
Kunal Mehta 7e0b5c9323 build: Updating development dependencies
* grunt-banana-checker: 0.3.0 → 0.4.0

Change-Id: I35ed93e20da10717e232cfbaa27453500adc6dba
2015-10-11 12:21:37 -04:00
Ed Sanders 02bb49c12e build: Update CSSLint from 0.4.0 to 0.5.0
Change-Id: Ide9d1ac96a9b1eb94b0c01ef8e8665ab75aa00a8
2015-09-18 17:15:23 +00:00
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