Use blocked scoped variables

In addition to using const and let, this also upgrades our linter config and removes lint (mostly whitespace).
This commit is contained in:
Tim Schaub
2018-01-11 23:32:36 -07:00
parent 0bf2b04dee
commit ad62739a6e
684 changed files with 18120 additions and 18184 deletions
+11 -11
View File
@@ -10,7 +10,7 @@ describe('ol.reproj.Triangulation', function() {
'+towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 ' +
'+units=m +no_defs');
register(proj4);
var proj27700 = getProjection('EPSG:27700');
const proj27700 = getProjection('EPSG:27700');
proj27700.setExtent([0, 0, 700000, 1300000]);
});
@@ -22,24 +22,24 @@ describe('ol.reproj.Triangulation', function() {
describe('constructor', function() {
it('is trivial for identity', function() {
var proj4326 = getProjection('EPSG:4326');
var triangulation = new Triangulation(proj4326, proj4326,
[20, 20, 30, 30], [-180, -90, 180, 90], 0);
const proj4326 = getProjection('EPSG:4326');
const triangulation = new Triangulation(proj4326, proj4326,
[20, 20, 30, 30], [-180, -90, 180, 90], 0);
expect(triangulation.getTriangles().length).to.be(2);
});
it('is empty when outside source extent', function() {
var proj4326 = getProjection('EPSG:4326');
var proj27700 = getProjection('EPSG:27700');
var triangulation = new Triangulation(proj27700, proj4326,
[0, 0, 10, 10], proj27700.getExtent(), 0);
const proj4326 = getProjection('EPSG:4326');
const proj27700 = getProjection('EPSG:27700');
const triangulation = new Triangulation(proj27700, proj4326,
[0, 0, 10, 10], proj27700.getExtent(), 0);
expect(triangulation.getTriangles().length).to.be(0);
});
it('can handle null source extent', function() {
var proj4326 = getProjection('EPSG:4326');
var triangulation = new Triangulation(proj4326, proj4326,
[20, 20, 30, 30], null, 0);
const proj4326 = getProjection('EPSG:4326');
const triangulation = new Triangulation(proj4326, proj4326,
[20, 20, 30, 30], null, 0);
expect(triangulation.getTriangles().length).to.be(2);
});
});