Closed manuq closed 10 years ago
Now i remembered why I dislike javascript :)
There are more magic strings?
Gonzalo
PD: Is almost a joke. No problem with the change at all.
On Tue, Nov 19, 2013 at 5:11 PM, manuq notifications@github.com wrote:
Avoid it on purpose in test/karma.conf.js and test/loader.js because there are no functions there, only settings.
Also fix errors that were silenced before:
-
if not using 'new' to instantiate a class, JSHint throws: "Missing 'new' prefix when invoking a constructor"
Console errors: "strict mode forbids implicit creation of global properties". Some variables missed 'var'.
You can merge this Pull Request by running
git pull https://github.com/manuq/sugar-web strict
Or view, comment on, or merge it at:
https://github.com/sugarlabs/sugar-web/pull/89 Commit Summary
- Set JS strict mode
File Changes
- M activity/activity.jshttps://github.com/sugarlabs/sugar-web/pull/89/files#diff-0(4)
- M activity/shortcut.jshttps://github.com/sugarlabs/sugar-web/pull/89/files#diff-1(5)
- M bus.jshttps://github.com/sugarlabs/sugar-web/pull/89/files#diff-2(5)
- M datastore.jshttps://github.com/sugarlabs/sugar-web/pull/89/files#diff-3(7)
- M dictstore.jshttps://github.com/sugarlabs/sugar-web/pull/89/files#diff-4(2)
- M env.jshttps://github.com/sugarlabs/sugar-web/pull/89/files#diff-5(2)
- M graphics/activitypalette.jshttps://github.com/sugarlabs/sugar-web/pull/89/files#diff-6(2)
- M graphics/grid.jshttps://github.com/sugarlabs/sugar-web/pull/89/files#diff-7(3)
- M graphics/icon.jshttps://github.com/sugarlabs/sugar-web/pull/89/files#diff-8(3)
- M graphics/menupalette.jshttps://github.com/sugarlabs/sugar-web/pull/89/files#diff-9(2)
- M graphics/palette.jshttps://github.com/sugarlabs/sugar-web/pull/89/files#diff-10(7)
- M graphics/radiobuttonsgroup.jshttps://github.com/sugarlabs/sugar-web/pull/89/files#diff-11(3)
- M graphics/xocolor.jshttps://github.com/sugarlabs/sugar-web/pull/89/files#diff-12(2)
- M test/busSpec.jshttps://github.com/sugarlabs/sugar-web/pull/89/files#diff-13(2)
- M test/datastoreSpec.jshttps://github.com/sugarlabs/sugar-web/pull/89/files#diff-14(2)
- M test/envSpec.jshttps://github.com/sugarlabs/sugar-web/pull/89/files#diff-15(2)
- M test/graphics/iconSpec.jshttps://github.com/sugarlabs/sugar-web/pull/89/files#diff-16(3)
- M test/graphics/menupaletteSpec.jshttps://github.com/sugarlabs/sugar-web/pull/89/files#diff-17(3)
- M test/graphics/paletteSpec.jshttps://github.com/sugarlabs/sugar-web/pull/89/files#diff-18(3)
- M test/graphics/radiobuttonsgroupSpec.jshttps://github.com/sugarlabs/sugar-web/pull/89/files#diff-19(2)
Patch Links:
My patch doesn't pass osbuild check. I will fix the build.
Happened locally too, but I thought it was an issue in my local build with xkbcomp http://buildbot.sugarlabs.org/builders/quick/builds/344/steps/shell_2/logs/stdio
But now I see is because strict mode http://buildbot.sugarlabs.org/builders/quick/builds/344/steps/shell_2/logs/modules
I see you did it already @dnarvaez . Thanks.
Avoid it on purpose in test/karma.conf.js and test/loader.js because there are no functions there, only settings.
Also fix errors that were silenced before: