Skip to content

Commit

Permalink
Adapt jshint for ES6 modules, fix semicolons
Browse files Browse the repository at this point in the history
  • Loading branch information
simon04 committed Jan 24, 2017
1 parent 81f3a33 commit bb8503f
Show file tree
Hide file tree
Showing 45 changed files with 45 additions and 44 deletions.
1 change: 1 addition & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"esversion": 6,
"curly": true,
"eqeqeq": true,
"latedef": "nofunc",
Expand Down
2 changes: 1 addition & 1 deletion lib/adjust_axis.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ export default function(crs, denorm, point) {
}
}
return out;
};
}
2 changes: 1 addition & 1 deletion lib/common/acosh.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default function(x) {
return 2 * Math.log(Math.sqrt((x + 1) / 2) + Math.sqrt((x - 1) / 2));
};
}
2 changes: 1 addition & 1 deletion lib/common/adjust_lat.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ import sign from './sign';

export default function(x) {
return (Math.abs(x) < HALF_PI) ? x : (x - (sign(x) * Math.PI));
};
}
2 changes: 1 addition & 1 deletion lib/common/adjust_lon.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ import sign from './sign';

export default function(x) {
return (Math.abs(x) <= SPI) ? x : (x - (sign(x) * TWO_PI));
};
}
2 changes: 1 addition & 1 deletion lib/common/asinh.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default function(x) {
var s = (x >= 0 ? 1 : -1);
return s * (Math.log(Math.abs(x) + Math.sqrt(x * x + 1)));
};
}
2 changes: 1 addition & 1 deletion lib/common/asinz.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ export default function(x) {
x = (x > 1) ? 1 : -1;
}
return Math.asin(x);
};
}
2 changes: 1 addition & 1 deletion lib/common/atanh.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default function(x) {
return Math.log((x - 1) / (x + 1)) / 2;
};
}
2 changes: 1 addition & 1 deletion lib/common/cosh.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export default function(x) {
var r = Math.exp(x);
r = (r + 1 / r) / 2;
return r;
};
}
2 changes: 1 addition & 1 deletion lib/common/e0fn.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default function(x) {
return (1 - 0.25 * x * (1 + x / 16 * (3 + 1.25 * x)));
};
}
2 changes: 1 addition & 1 deletion lib/common/e1fn.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default function(x) {
return (0.375 * x * (1 + 0.25 * x * (1 + 0.46875 * x)));
};
}
2 changes: 1 addition & 1 deletion lib/common/e2fn.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default function(x) {
return (0.05859375 * x * x * (1 + 0.75 * x));
};
}
2 changes: 1 addition & 1 deletion lib/common/e3fn.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default function(x) {
return (x * x * x * (35 / 3072));
};
}
2 changes: 1 addition & 1 deletion lib/common/fL.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ var HALF_PI = Math.PI/2;

export default function(x, L) {
return 2 * Math.atan(x * Math.exp(L)) - HALF_PI;
};
}
2 changes: 1 addition & 1 deletion lib/common/gN.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default function(a, e, sinphi) {
var temp = e * sinphi;
return a / Math.sqrt(1 - temp * temp);
};
}
2 changes: 1 addition & 1 deletion lib/common/imlfn.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ export default function(ml, e0, e1, e2, e3) {

//..reportError("IMLFN-CONV:Latitude failed to converge after 15 iterations");
return NaN;
};
}
2 changes: 1 addition & 1 deletion lib/common/inverseNadCvt.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ export default function(t, val, tb, ct) {
val.x = adjust_lon(t.x + ct.ll[0]);
val.y = t.y + ct.ll[1];
return val;
};
}
2 changes: 1 addition & 1 deletion lib/common/invlatiso.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export default function(eccent, ts) {
phi = fL(Math.exp(eccent * Math.log((1 + con) / (1 - con)) / 2), ts);
} while (Math.abs(phi - Iphi) > 1.0e-12);
return phi;
};
}
2 changes: 1 addition & 1 deletion lib/common/iqsfnz.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ export default function(eccent, q) {

//console.log("IQSFN-CONV:Latitude failed to converge after 30 iterations");
return NaN;
};
}
2 changes: 1 addition & 1 deletion lib/common/latiso.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ export default function(eccent, phi, sinphi) {

var con = eccent * sinphi;
return Math.log(Math.tan((HALF_PI + phi) / 2)) + eccent * Math.log((1 - con) / (1 + con)) / 2;
};
}
2 changes: 1 addition & 1 deletion lib/common/mlfn.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default function(e0, e1, e2, e3, phi) {
return (e0 * phi - e1 * Math.sin(2 * phi) + e2 * Math.sin(4 * phi) - e3 * Math.sin(6 * phi));
};
}
2 changes: 1 addition & 1 deletion lib/common/msfnz.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default function(eccent, sinphi, cosphi) {
var con = eccent * sinphi;
return cosphi / (Math.sqrt(1 - con * con));
};
}
2 changes: 1 addition & 1 deletion lib/common/nadInterBreakout.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ export default function(indx, frct, letter, number, ct) {
}
}
return [indx, frct];
};
}
2 changes: 1 addition & 1 deletion lib/common/nad_cvt.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ export default function(pin, inverse, ct) {
}
}
return val;
};
}
2 changes: 1 addition & 1 deletion lib/common/nad_intr.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ export default function(pin, ct) {
val.x = (m00 * f00.x + m10 * f10.x + m01 * f01.x + m11 * f11.x);
val.y = (m00 * f00.y + m10 * f10.y + m01 * f01.y + m11 * f11.y);
return val;
};
}
2 changes: 1 addition & 1 deletion lib/common/phi2z.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ export default function(eccent, ts) {
}
//console.log("phi2z has NoConvergence");
return -9999;
};
}
2 changes: 1 addition & 1 deletion lib/common/pj_enfn.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ export default function(es) {
en[3] = t * (C66 - es * C68);
en[4] = t * es * C88;
return en;
};
}
2 changes: 1 addition & 1 deletion lib/common/pj_inv_mlfn.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ export default function(arg, es, en) {
}
//..reportError("cass:pj_inv_mlfn: Convergence error");
return phi;
};
}
2 changes: 1 addition & 1 deletion lib/common/pj_mlfn.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export default function(phi, sphi, cphi, en) {
cphi *= sphi;
sphi *= sphi;
return (en[0] * phi - cphi * (en[1] + sphi * (en[2] + sphi * (en[3] + sphi * en[4]))));
};
}
2 changes: 1 addition & 1 deletion lib/common/qsfnz.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ export default function(eccent, sinphi) {
else {
return (2 * sinphi);
}
};
}
2 changes: 1 addition & 1 deletion lib/common/sign.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default function(x) {
return x<0 ? -1 : 1;
};
}
2 changes: 1 addition & 1 deletion lib/common/sinh.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export default function(x) {
var r = Math.exp(x);
r = (r - 1 / r) / 2;
return r;
};
}
2 changes: 1 addition & 1 deletion lib/common/srat.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default function(esinp, exp) {
return (Math.pow((1 - esinp) / (1 + esinp), exp));
};
}
2 changes: 1 addition & 1 deletion lib/common/tanh.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export default function(x) {
var r = Math.exp(x);
r = (r - 1 / r) / (r + 1 / r);
return r;
};
}
2 changes: 1 addition & 1 deletion lib/common/toPoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export default function (array){
out.m = array[3];
}
return out;
};
}
2 changes: 1 addition & 1 deletion lib/common/tsfnz.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ export default function(eccent, phi, sinphi) {
var com = 0.5 * eccent;
con = Math.pow(((1 - con) / (1 + con)), com);
return (Math.tan(0.5 * (HALF_PI - phi)) / con);
};
}
2 changes: 1 addition & 1 deletion lib/datumUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function compareDatums(source, dest) {
if (source.datum_type !== dest.datum_type) {
return false; // false, datums are not equal
} else if (source.a !== dest.a || Math.abs(source.es - dest.es) > 0.000000000050) {
// the tolerence for es is to ensure that GRS80 and WGS84
// the tolerance for es is to ensure that GRS80 and WGS84
// are considered identical
return false;
} else if (source.datum_type === PJD_3PARAM) {
Expand Down
2 changes: 1 addition & 1 deletion lib/datum_transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ export default function(source, dest, point) {
}
return datum.geocentricToGeodetic(point, dest.es, dest.a, dest.b);

};
}
2 changes: 1 addition & 1 deletion lib/extend.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ export default function(destination, source) {
}
}
return destination;
};
}
2 changes: 1 addition & 1 deletion lib/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export default function(defs) {
defs.GOOGLE = defs['EPSG:3857'];
defs['EPSG:900913'] = defs['EPSG:3857'];
defs['EPSG:102113'] = defs['EPSG:3857'];
};
}
2 changes: 1 addition & 1 deletion lib/includedProjections.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ export default function(proj4){
projs.forEach(function(proj){
proj4.Proj.projections.add(proj);
});
};
}
2 changes: 1 addition & 1 deletion lib/projString.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,4 @@ export default function(defData) {
self.datumCode = self.datumCode.toLowerCase();
}
return self;
};
}
2 changes: 1 addition & 1 deletion lib/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ export default function transform(source, dest, point) {
}

return point;
};
}
2 changes: 1 addition & 1 deletion lib/wkt.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,4 +221,4 @@ export default function(wkt, self) {
sExpr(lisp, obj);
cleanWKT(obj.output);
return extend(self, obj.output);
};
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"grunt-cli": "~0.1.13",
"grunt": "~0.4.2",
"grunt-contrib-connect": "~0.6.0",
"grunt-contrib-jshint": "~0.8.0",
"grunt-contrib-jshint": "~1.1.0",
"chai": "~1.8.1",
"mocha": "~1.17.1",
"grunt-mocha-phantomjs": "~0.4.0",
Expand Down

0 comments on commit bb8503f

Please sign in to comment.