Skip to content

Commit

Permalink
fix undefined variables, added jshint checks, closes #102
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed Jul 2, 2015
1 parent f770a7c commit 536e55f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
15 changes: 14 additions & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,18 @@
"sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
"trailing" : false, // Prohibit trailing whitespaces.
"white" : false, // Check against strict whitespace and indentation rules.
"indent" : 4 // Specify indentation spacing
"indent" : 4, // Specify indentation spacing

// variables
"undef": true,
"-W079": true, // Silence redefinition errors (they are false positives).
"predef": [
"Matter", "window", "document", "Element", "MatterTools", "PIXI",
"$", "Image", "navigator", "setTimeout", "decomp", "HTMLElement",
"Body", "Composite", "World", "Contact", "Detector", "Grid",
"Pairs", "Pair", "Resolver", "SAT", "Constraint", "MouseConstraint",
"Common", "Engine", "Mouse", "Sleeping", "Bodies", "Composites",
"Axes", "Bounds", "Vector", "Vertices", "Render", "RenderPixi",
"Events", "Query", "Runner", "Svg", "Metrics"
]
}
1 change: 1 addition & 0 deletions src/collision/Resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ var Resolver = {};
normal,
bodyBtoA,
contactShare,
positionImpulse,
contactCount = {},
tempA = Vector._temp[0],
tempB = Vector._temp[1],
Expand Down
2 changes: 1 addition & 1 deletion src/geometry/Svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var Svg = {};
var i, il, total, point, segment, segments,
segmentsQueue, lastSegment,
lastPoint, segmentIndex, points = [],
length = 0, x = 0, y = 0;
lx, ly, length = 0, x = 0, y = 0;

sampleLength = sampleLength || 15;

Expand Down
6 changes: 4 additions & 2 deletions src/render/Render.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,8 @@ var Render = {};
options = render.options,
body,
part,
i;
i,
k;

for (i = 0; i < bodies.length; i++) {
body = bodies[i];
Expand Down Expand Up @@ -684,7 +685,8 @@ var Render = {};
options = render.options,
body,
part,
i;
i,
k;

c.beginPath();

Expand Down

0 comments on commit 536e55f

Please sign in to comment.