Merge pull request #6916 from marcjansen/eslint-4-upgrade
Upgrade eslint to v4.0.0
This commit is contained in:
20
package.json
20
package.json
@@ -57,7 +57,7 @@
|
|||||||
"clean-css-cli": "4.1.4",
|
"clean-css-cli": "4.1.4",
|
||||||
"coveralls": "2.13.1",
|
"coveralls": "2.13.1",
|
||||||
"debounce": "^1.0.0",
|
"debounce": "^1.0.0",
|
||||||
"eslint": "3.19.0",
|
"eslint": "4.0.0",
|
||||||
"eslint-config-openlayers": "7.0.0",
|
"eslint-config-openlayers": "7.0.0",
|
||||||
"eslint-plugin-openlayers-internal": "^3.1.0",
|
"eslint-plugin-openlayers-internal": "^3.1.0",
|
||||||
"expect.js": "0.3.1",
|
"expect.js": "0.3.1",
|
||||||
@@ -100,7 +100,23 @@
|
|||||||
"openlayers-internal/one-provide": 2,
|
"openlayers-internal/one-provide": 2,
|
||||||
"openlayers-internal/requires-first": 2,
|
"openlayers-internal/requires-first": 2,
|
||||||
"openlayers-internal/valid-provide": 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": [
|
"ext": [
|
||||||
|
|||||||
@@ -47,15 +47,15 @@ ol.events.Event = function(type) {
|
|||||||
*/
|
*/
|
||||||
ol.events.Event.prototype.preventDefault =
|
ol.events.Event.prototype.preventDefault =
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop event propagation.
|
* Stop event propagation.
|
||||||
* @function
|
* @function
|
||||||
* @override
|
* @override
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.events.Event.prototype.stopPropagation = function() {
|
ol.events.Event.prototype.stopPropagation = function() {
|
||||||
this.propagationStopped = true;
|
this.propagationStopped = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -121,9 +121,11 @@ ol.format.EsriJSON.convertRings_ = function(rings, layout) {
|
|||||||
// loop over all outer rings and see if they contain our hole.
|
// loop over all outer rings and see if they contain our hole.
|
||||||
for (i = outerRings.length - 1; i >= 0; i--) {
|
for (i = outerRings.length - 1; i >= 0; i--) {
|
||||||
var outerRing = outerRings[i][0];
|
var outerRing = outerRings[i][0];
|
||||||
if (ol.extent.containsExtent(new ol.geom.LinearRing(
|
var containsHole = ol.extent.containsExtent(
|
||||||
outerRing).getExtent(),
|
new ol.geom.LinearRing(outerRing).getExtent(),
|
||||||
new ol.geom.LinearRing(hole).getExtent())) {
|
new ol.geom.LinearRing(hole).getExtent()
|
||||||
|
);
|
||||||
|
if (containsHole) {
|
||||||
// the hole is contained push it into our polygon
|
// the hole is contained push it into our polygon
|
||||||
outerRings[i].push(hole);
|
outerRings[i].push(hole);
|
||||||
matched = true;
|
matched = true;
|
||||||
|
|||||||
@@ -549,7 +549,7 @@ ol.format.KML.readStyleMapValue_ = function(node, objectStack) {
|
|||||||
return ol.xml.pushParseAndPop(undefined,
|
return ol.xml.pushParseAndPop(undefined,
|
||||||
ol.format.KML.STYLE_MAP_PARSERS_, node, objectStack);
|
ol.format.KML.STYLE_MAP_PARSERS_, node, objectStack);
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @param {Node} node Node.
|
* @param {Node} node Node.
|
||||||
* @param {Array.<*>} objectStack Object stack.
|
* @param {Array.<*>} objectStack Object stack.
|
||||||
* @private
|
* @private
|
||||||
|
|||||||
@@ -217,7 +217,8 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
|
|||||||
// the pixel.
|
// the pixel.
|
||||||
ol.obj.clear(this.featureLayerAssociation_);
|
ol.obj.clear(this.featureLayerAssociation_);
|
||||||
map.forEachFeatureAtPixel(mapBrowserEvent.pixel,
|
map.forEachFeatureAtPixel(mapBrowserEvent.pixel,
|
||||||
(/**
|
(
|
||||||
|
/**
|
||||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||||
* @param {ol.layer.Layer} layer Layer.
|
* @param {ol.layer.Layer} layer Layer.
|
||||||
* @return {boolean|undefined} Continue to iterate over the features.
|
* @return {boolean|undefined} Continue to iterate over the features.
|
||||||
@@ -250,7 +251,8 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
|
|||||||
} else {
|
} else {
|
||||||
// Modify the currently selected feature(s).
|
// Modify the currently selected feature(s).
|
||||||
map.forEachFeatureAtPixel(mapBrowserEvent.pixel,
|
map.forEachFeatureAtPixel(mapBrowserEvent.pixel,
|
||||||
(/**
|
(
|
||||||
|
/**
|
||||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||||
* @param {ol.layer.Layer} layer Layer.
|
* @param {ol.layer.Layer} layer Layer.
|
||||||
* @return {boolean|undefined} Continue to iterate over the features.
|
* @return {boolean|undefined} Continue to iterate over the features.
|
||||||
|
|||||||
Reference in New Issue
Block a user