GrayBullet / generator-graybullet-cordova

Webapp and AngularJS yeoman generator for Apache Cordova.
MIT License
10 stars 4 forks source link

Task "jshint:all" failed. #7

Closed hirokihara closed 9 years ago

hirokihara commented 9 years ago

run "grunt default" task. but Task "jshint:all" failed.

RIA-no-Mac:graybullet-cordova ria$ grunt default
Running "newer:jshint" (newer) task

Running "newer:jshint:all" (newer) task

Running "jshint:all" (jshint) task

app/scripts/main.js
  line 4  col 3  Missing "use strict" statement.

✖ 1 problem

Warning: Task "jshint:all" failed. Use --force to continue.

Aborted due to warnings.

Execution Time (2014-11-06 04:21:51 UTC)
loading tasks   1.2s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 78%
jshint:all     319ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 21%
Total 1.5s

RIA-no-Mac:graybullet-cordova ria$ 
masakura commented 9 years ago

Default javascript code is

console.log('\'Allo \'Allo!');

$(document).on('deviceready', function () {
  console.log('deviceready');
});

Append 'use strict'.

console.log('\'Allo \'Allo!');

$(document).on('deviceready', function () {
  'use strict';

  console.log('deviceready');
});

Run jshint without errors.

$ grunt jshint
Running "jshint:all" (jshint) task

✔ No problems

Done, without errors.

Execution Time (2014-11-06 23:44:43 UTC)
loading tasks     4s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 97%
jshint:all     124ms  ▇▇▇ 3%
Total 4.1s

More good idea?

hirokihara commented 9 years ago

ummm... sorry i have no idea.

Thank you for the fix :)

masakura commented 9 years ago

Test failed...

https://travis-ci.org/GrayBullet/generator-graybullet-cordova/builds/42741775