Skip to content

Commit

Permalink
Merge pull request #1322 from gavinr/semistandard-14
Browse files Browse the repository at this point in the history
updated to semistandard 14
  • Loading branch information
gavinr authored Feb 28, 2022
2 parents 37df254 + e4d3d98 commit daebcc8
Show file tree
Hide file tree
Showing 22 changed files with 1,549 additions and 1,620 deletions.
2,021 changes: 975 additions & 1,046 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"npm-run-all": "^4.1.5",
"rollup": "^2.67.2",
"rollup-plugin-terser": "^7.0.2",
"semistandard": "^13.0.1",
"semistandard": "^14.2.3",
"sinon": "^13.0.1",
"sinon-chai": "3.7.0",
"snazzy": "^9.0.0",
Expand Down
4 changes: 2 additions & 2 deletions profiles/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default {
jsnext: true,
main: false,
browser: false,
extensions: [ '.js', '.json' ]
extensions: ['.js', '.json']
}),
json()
],
Expand All @@ -25,7 +25,7 @@ export default {
format: 'umd',
name: 'L.esri',
globals: {
'leaflet': 'L',
leaflet: 'L',
'esri-leaflet': 'L.esri',
'@terraformer/arcgis': 'Terraformer'
},
Expand Down
26 changes: 13 additions & 13 deletions spec/Layers/BasemapLayerSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,26 @@ describe('L.esri.BasemapLayer', function () {
var server;
var clock;
var mockAttributions = {
'contributors': [
contributors: [
{
'attribution': 'SkyNet',
'coverageAreas': [
attribution: 'SkyNet',
coverageAreas: [
{
'zoomMax': 19,
'zoomMin': 0,
'score': 50,
'bbox': [-84.94, -179.66, 84.94, 179.66]
zoomMax: 19,
zoomMin: 0,
score: 50,
bbox: [-84.94, -179.66, 84.94, 179.66]
}
]
},
{
'attribution': 'City & County of San Francisco',
'coverageAreas': [
attribution: 'City & County of San Francisco',
coverageAreas: [
{
'zoomMax': 19,
'zoomMin': 16,
'score': 100,
'bbox': [37.71, -122.51, 37.83, -122.36]
zoomMax: 19,
zoomMin: 16,
score: 100,
bbox: [37.71, -122.51, 37.83, -122.36]
}
]
}
Expand Down
28 changes: 14 additions & 14 deletions spec/Layers/DynamicMapLayerSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@ describe('L.esri.DynamicMapLayer', function () {
var clock;

var sampleResponse = {
'results': [
results: [
{
'layerId': 0,
'layerName': 'Features',
'displayFieldName': 'Name',
'value': '0',
'attributes': {
'OBJECTID': 1,
'Name': 'Site'
layerId: 0,
layerName: 'Features',
displayFieldName: 'Name',
value: '0',
attributes: {
OBJECTID: 1,
Name: 'Site'
},
'geometryType': 'esriGeometryPoint',
'geometry': {
'x': -122.81,
'y': 45.48,
'spatialReference': {
'wkid': 4326
geometryType: 'esriGeometryPoint',
geometry: {
x: -122.81,
y: 45.48,
spatialReference: {
wkid: 4326
}
}
}
Expand Down
46 changes: 23 additions & 23 deletions spec/Layers/FeatureLayer/FeatureManagerSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ describe('L.esri.FeatureManager', function () {

// geojson:
var feature7 = {
'type': 'Feature',
'geometry':
type: 'Feature',
geometry:
{
'type': 'Polygon',
'coordinates':
type: 'Polygon',
coordinates:
[
[
[-90.3038149502124, 38.6539545785218],
Expand All @@ -234,15 +234,15 @@ describe('L.esri.FeatureManager', function () {
]
]
},
'properties': null
properties: null
};

var feature8 = {
'type': 'Feature',
'geometry':
type: 'Feature',
geometry:
{
'type': 'Polygon',
'coordinates':
type: 'Polygon',
coordinates:
[
[
[-90.3038149502124, 38.6539545785218],
Expand All @@ -251,7 +251,7 @@ describe('L.esri.FeatureManager', function () {
]
]
},
'properties': null
properties: null
};

it('should be able to add itself to a map', function () {
Expand Down Expand Up @@ -1262,8 +1262,8 @@ describe('L.esri.FeatureManager', function () {
'GET',
'http://gis.example.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0/query?returnGeometry=true&where=1%3D1&outSR=4326&outFields=*&inSR=4326&geometry=%7B%22xmin%22%3A-122.6513671875%2C%22ymin%22%3A45.49094569262732%2C%22xmax%22%3A-122.607421875%2C%22ymax%22%3A45.521743896993634%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&geometryPrecision=6&resultOffset=0&resultType=tile&f=geojson',
JSON.stringify({
'type': 'FeatureCollection',
'features': [feature7] })
type: 'FeatureCollection',
features: [feature7] })
);

var layer = new MockLayer({
Expand Down Expand Up @@ -1359,9 +1359,9 @@ describe('L.esri.FeatureManager', function () {
'GET',
'http://gis.example.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0/query?returnGeometry=true&where=1%3D1&outSR=4326&outFields=*&inSR=4326&geometry=%7B%22xmin%22%3A-122.6513671875%2C%22ymin%22%3A45.49094569262732%2C%22xmax%22%3A-122.607421875%2C%22ymax%22%3A45.521743896993634%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&geometryPrecision=6&resultOffset=0&resultType=tile&f=geojson',
JSON.stringify({
'type': 'FeatureCollection',
'features': [feature7],
'exceededTransferLimit': true
type: 'FeatureCollection',
features: [feature7],
exceededTransferLimit: true
})
);

Expand All @@ -1381,8 +1381,8 @@ describe('L.esri.FeatureManager', function () {
'GET',
'http://gis.example.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0/query?returnGeometry=true&where=1%3D1&outSR=4326&outFields=*&inSR=4326&geometry=%7B%22xmin%22%3A-122.6513671875%2C%22ymin%22%3A45.49094569262732%2C%22xmax%22%3A-122.607421875%2C%22ymax%22%3A45.521743896993634%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&geometryPrecision=6&resultOffset=1&resultType=tile&f=geojson',
JSON.stringify({
'type': 'FeatureCollection',
'features': [feature8]
type: 'FeatureCollection',
features: [feature8]
})
);
server.respond();
Expand All @@ -1394,10 +1394,10 @@ describe('L.esri.FeatureManager', function () {
'GET',
'http://gis.example.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0/query?returnGeometry=true&where=1%3D1&outSR=4326&outFields=*&inSR=4326&geometry=%7B%22xmin%22%3A-122.6513671875%2C%22ymin%22%3A45.49094569262732%2C%22xmax%22%3A-122.607421875%2C%22ymax%22%3A45.521743896993634%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&geometryPrecision=6&resultOffset=0&resultType=tile&f=geojson',
JSON.stringify({
'type': 'FeatureCollection',
'features': [feature7],
'properties': {
'exceededTransferLimit': true
type: 'FeatureCollection',
features: [feature7],
properties: {
exceededTransferLimit: true
}
})
);
Expand All @@ -1418,8 +1418,8 @@ describe('L.esri.FeatureManager', function () {
'GET',
'http://gis.example.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0/query?returnGeometry=true&where=1%3D1&outSR=4326&outFields=*&inSR=4326&geometry=%7B%22xmin%22%3A-122.6513671875%2C%22ymin%22%3A45.49094569262732%2C%22xmax%22%3A-122.607421875%2C%22ymax%22%3A45.521743896993634%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&geometryPrecision=6&resultOffset=1&resultType=tile&f=geojson',
JSON.stringify({
'type': 'FeatureCollection',
'features': [feature8]
type: 'FeatureCollection',
features: [feature8]
})
);
server.respond();
Expand Down
30 changes: 15 additions & 15 deletions spec/Layers/ImageMapLayerSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@ describe('L.esri.ImageMapLayer', function () {
var clock;

var sampleResponse = {
'objectId': 0,
'name': 'Pixel',
'value': '-17.5575',
'location': {
'x': -122.81,
'y': 45.48,
'spatialReference': {
'wkid': 4326
objectId: 0,
name: 'Pixel',
value: '-17.5575',
location: {
x: -122.81,
y: 45.48,
spatialReference: {
wkid: 4326
}
},
'properties': null,
'catalogItems': null,
'catalogItemVisibilities': []
properties: null,
catalogItems: null,
catalogItemVisibilities: []
};

beforeEach(function () {
Expand Down Expand Up @@ -236,7 +236,7 @@ describe('L.esri.ImageMapLayer', function () {
});

layer.addTo(map);
layer.setMosaicRule({ mosaicMethod: 'esriMosaicLockRaster', 'lockRasterIds': [8] });
layer.setMosaicRule({ mosaicMethod: 'esriMosaicLockRaster', lockRasterIds: [8] });

map.fire('click', {
latlng: map.getCenter()
Expand Down Expand Up @@ -319,7 +319,7 @@ describe('L.esri.ImageMapLayer', function () {
});

layer.setRenderingRule({ rasterFunction: 'RFTAspectColor' });
expect(layer.getRenderingRule()).to.deep.equal({ 'rasterFunction': 'RFTAspectColor' });
expect(layer.getRenderingRule()).to.deep.equal({ rasterFunction: 'RFTAspectColor' });
layer.addTo(map);
server.respond();
});
Expand All @@ -334,8 +334,8 @@ describe('L.esri.ImageMapLayer', function () {
done();
});

layer.setMosaicRule({ mosaicMethod: 'esriMosaicLockRaster', 'lockRasterIds': [8] });
expect(layer.getMosaicRule()).to.deep.equal({ mosaicMethod: 'esriMosaicLockRaster', 'lockRasterIds': [8] });
layer.setMosaicRule({ mosaicMethod: 'esriMosaicLockRaster', lockRasterIds: [8] });
expect(layer.getMosaicRule()).to.deep.equal({ mosaicMethod: 'esriMosaicLockRaster', lockRasterIds: [8] });
layer.addTo(map);
server.respond();
});
Expand Down
2 changes: 1 addition & 1 deletion spec/RequestSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('L.esri request helpers', function () {
soapUrl: 'http://services.arcgisonline.com/arcgis/services',
secureSoapUrl: 'https://services.arcgisonline.com/arcgis/services',
authInfo: {
'isTokenBasedSecurity': 'false'
isTokenBasedSecurity: 'false'
}
};

Expand Down
Loading

0 comments on commit daebcc8

Please sign in to comment.