Merge pull request #6916 from marcjansen/eslint-4-upgrade

Upgrade eslint to v4.0.0
This commit is contained in:
Marc Jansen
2017-06-22 07:55:06 +02:00
committed by GitHub
198 changed files with 1810 additions and 1790 deletions

View File

@@ -57,7 +57,7 @@
"clean-css-cli": "4.1.4",
"coveralls": "2.13.1",
"debounce": "^1.0.0",
"eslint": "3.19.0",
"eslint": "4.0.0",
"eslint-config-openlayers": "7.0.0",
"eslint-plugin-openlayers-internal": "^3.1.0",
"expect.js": "0.3.1",
@@ -100,7 +100,23 @@
"openlayers-internal/one-provide": 2,
"openlayers-internal/requires-first": 2,
"openlayers-internal/valid-provide": 2,
"openlayers-internal/valid-requires": 2
"openlayers-internal/valid-requires": 2,
"indent": [2, 2, {
"VariableDeclarator": 2,
"SwitchCase": 1,
"MemberExpression": 2,
"FunctionDeclaration": {
"parameters": 2,
"body": 1
},
"FunctionExpression": {
"parameters": 2,
"body": 1
},
"CallExpression": {
"arguments": 2
}
}]
}
},
"ext": [

View File

@@ -121,9 +121,11 @@ ol.format.EsriJSON.convertRings_ = function(rings, layout) {
// loop over all outer rings and see if they contain our hole.
for (i = outerRings.length - 1; i >= 0; i--) {
var outerRing = outerRings[i][0];
if (ol.extent.containsExtent(new ol.geom.LinearRing(
outerRing).getExtent(),
new ol.geom.LinearRing(hole).getExtent())) {
var containsHole = ol.extent.containsExtent(
new ol.geom.LinearRing(outerRing).getExtent(),
new ol.geom.LinearRing(hole).getExtent()
);
if (containsHole) {
// the hole is contained push it into our polygon
outerRings[i].push(hole);
matched = true;

View File

@@ -217,7 +217,8 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
// the pixel.
ol.obj.clear(this.featureLayerAssociation_);
map.forEachFeatureAtPixel(mapBrowserEvent.pixel,
(/**
(
/**
* @param {ol.Feature|ol.render.Feature} feature Feature.
* @param {ol.layer.Layer} layer Layer.
* @return {boolean|undefined} Continue to iterate over the features.
@@ -250,7 +251,8 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
} else {
// Modify the currently selected feature(s).
map.forEachFeatureAtPixel(mapBrowserEvent.pixel,
(/**
(
/**
* @param {ol.Feature|ol.render.Feature} feature Feature.
* @param {ol.layer.Layer} layer Layer.
* @return {boolean|undefined} Continue to iterate over the features.