Skip to content

Commit

Permalink
fix: get rid of unnecessary quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
annarieger committed Nov 16, 2022
1 parent d157fad commit 2500acb
Show file tree
Hide file tree
Showing 22 changed files with 79 additions and 77 deletions.
4 changes: 2 additions & 2 deletions src/BackgroundLayerChooser/BackgroundLayerChooser.example.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const layers = [
source: new OlSourceTileWMS({
url: 'https://sgx.geodatenzentrum.de/wms_topplus_open',
params: {
'LAYERS': 'web',
'TILED': true
LAYERS: 'web',
TILED: true
}
}),
properties: {
Expand Down
48 changes: 24 additions & 24 deletions src/Button/PrintButton/PrintButton.example.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,39 +31,39 @@ const PrintButtonExample = () => {
const [status, setStatus] = useState('pending');

const geojson = useMemo(() => ({
'type': 'FeatureCollection',
'crs': {
'type': 'name',
'properties': {
'name': 'EPSG:3857',
type: 'FeatureCollection',
crs: {
type: 'name',
properties: {
name: 'EPSG:3857',
},
},
'features': [
features: [
{
'type': 'Feature',
'geometry': {
'type': 'LineString',
'coordinates': [
type: 'Feature',
geometry: {
type: 'LineString',
coordinates: [
[4e6, 2e6],
[8e6, 4e6],
],
},
},
{
'type': 'Feature',
'geometry': {
'type': 'LineString',
'coordinates': [
type: 'Feature',
geometry: {
type: 'LineString',
coordinates: [
[4e6, 2e6],
[8e6, -2e6],
],
},
},
{
'type': 'Feature',
'geometry': {
'type': 'Polygon',
'coordinates': [
type: 'Feature',
geometry: {
type: 'Polygon',
coordinates: [
[
[2e6, 5e6],
[2e6, 6e6],
Expand All @@ -72,7 +72,7 @@ const PrintButtonExample = () => {
],
],
},
},
}
]}
));

Expand All @@ -83,16 +83,16 @@ const PrintButtonExample = () => {
});

const styles = {
'Point': new Style({
Point: new Style({
image: image,
}),
'LineString': new Style({
LineString: new Style({
stroke: new Stroke({
color: 'green',
width: 1,
}),
}),
'Polygon': new Style({
Polygon: new Style({
stroke: new Stroke({
color: 'blue',
lineDash: [4],
Expand All @@ -102,7 +102,7 @@ const PrintButtonExample = () => {
color: 'rgba(0, 0, 255, 0.1)',
}),
}),
'Circle': new Style({
Circle: new Style({
stroke: new Stroke({
color: 'red',
width: 2,
Expand Down Expand Up @@ -148,7 +148,7 @@ const PrintButtonExample = () => {
opacity: 0.5,
source: new OlSourceTileWMS({
url: 'https://geoserver.mundialis.de/geoserver/wms',
params: {'LAYERS': '1_040302', 'TILED': true},
params: {LAYERS: '1_040302', TILED: true},
serverType: 'geoserver'
})
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ describe('<AddWmsLayerEntry />', () => {
source: new OlSourceTileWMS({
url: 'https://ows.terrestris.de/osm/service?',
params: {
'LAYERS': testLayerName,
'TILED': true
LAYERS: testLayerName,
TILED: true
}
})
});
Expand Down
8 changes: 4 additions & 4 deletions src/Container/AddWmsPanel/AddWmsPanel.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ describe('<AddWmsPanel />', () => {
source: new OlSourceTileWMS({
url: 'https://ows.terrestris.de/osm/service?',
params: {
'LAYERS': testLayerName,
'TILED': true
LAYERS: testLayerName,
TILED: true
}
})
});
Expand All @@ -35,8 +35,8 @@ describe('<AddWmsPanel />', () => {
source: new OlSourceTileWMS({
url: 'https://ows.terrestris.de/osm/service?',
params: {
'LAYERS': testLayerName2,
'TILED': true
LAYERS: testLayerName2,
TILED: true
}
})
});
Expand Down
4 changes: 2 additions & 2 deletions src/CoordinateInfo/CoordinateInfo.example.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const queryLayer = new OlLayerTile({
source: new OlSourceTileWMS({
url: 'https://ahocevar.com/geoserver/wms',
params: {
'LAYERS': 'usa:states',
'TILED': true
LAYERS: 'usa:states',
TILED: true
},
serverType: 'geoserver',
crossOrigin: 'anonymous'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ describe('<CoordinateReferenceSystemCombo />', () => {
it('does not show options for empty results', async () => {
(fetch as FetchMock).mockResponseOnce(JSON.stringify({
status: 'ok',
'number_result': 0,
// eslint-disable-next-line camelcase
number_result: 0,
results: []
}));

Expand Down
8 changes: 4 additions & 4 deletions src/Field/ScaleCombo/ScaleCombo.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('<ScaleCombo />', () => {
const props = {
map,
style: {
'backgroundColor': 'yellow'
backgroundColor: 'yellow'
}
};
const wrapper = TestUtil.mountComponent(ScaleCombo, props);
Expand Down Expand Up @@ -64,7 +64,7 @@ describe('<ScaleCombo />', () => {

// Reset the scales array, as getOptionsFromMap() will be called in
// constructor.
wrapper.setState({'scales': []});
wrapper.setState({scales: []});

const scales = wrapper.instance().getOptionsFromMap();
expect(scales).toBeInstanceOf(Array);
Expand All @@ -84,7 +84,7 @@ describe('<ScaleCombo />', () => {

// Reset the scales array, as getOptionsFromMap() will be called in
// constructor.
wrapper.setState({'scales': []});
wrapper.setState({scales: []});

const scales = wrapper.instance().getOptionsFromMap();
expect(scales).toBeInstanceOf(Array);
Expand Down Expand Up @@ -119,7 +119,7 @@ describe('<ScaleCombo />', () => {

// Reset the scales array, as getOptionsFromMap() will be called in
// constructor.
wrapper.setState({'scales': []});
wrapper.setState({scales: []});

const scales = wrapper.instance().getOptionsFromMap();
expect(scales).toBeInstanceOf(Array);
Expand Down
8 changes: 4 additions & 4 deletions src/Field/WfsSearch/WfsSearch.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe('<WfsSearch />', () => {
}
}];
const map = new OlMap({
layers: [new OlLayerTile({name: 'OSM', source: new OlSourceOsm()})],
layers: [new OlLayerTile({ name: 'OSM', source: new OlSourceOsm() })],
view: new OlView({
projection: 'EPSG:4326',
center: [37.40570, 8.81566],
Expand All @@ -110,7 +110,7 @@ describe('<WfsSearch />', () => {
wrapper.setState({
data: data
});
wrapper.instance().onMenuItemSelected('Deutschland', {key: '752526'});
wrapper.instance().onMenuItemSelected('Deutschland', { key: '752526' });
expect(selectSpy).toHaveBeenCalled();
expect(selectSpy).toHaveBeenCalledWith(data[0], map);

Expand All @@ -133,7 +133,7 @@ describe('<WfsSearch />', () => {
}
};
const map = new OlMap({
layers: [new OlLayerTile({name: 'OSM', source: new OlSourceOsm()})],
layers: [new OlLayerTile({ name: 'OSM', source: new OlSourceOsm() })],
view: new OlView({
projection: 'EPSG:4326',
center: [37.40570, 8.81566],
Expand All @@ -143,7 +143,7 @@ describe('<WfsSearch />', () => {
});
// SETUP END

const wrapper = TestUtil.mountComponent(WfsSearch, {map});
const wrapper = TestUtil.mountComponent(WfsSearch, { map });
const fitSpy = jest.spyOn(map.getView(), 'fit');
wrapper.props().onSelect(feature, map);

Expand Down
7 changes: 4 additions & 3 deletions src/Field/WfsSearchInput/WfsSearchInput.example.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,14 @@ class WfsSearchInputExample extends React.Component {
enableColResize={true}
attributeBlacklist={['osm_id', 'admin_level', 'administrative']}
columnDefs={{
'id': {
id: {
headerName: 'ID'
},
'name': {
name: {
headerName: 'Country name'
},
'admin_level': {
// eslint-disable-next-line camelcase
admin_level: {
headerName: 'Administrative level'
}
}}
Expand Down
6 changes: 3 additions & 3 deletions src/Grid/AgFeatureGrid/AgFeatureGrid.example.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,21 @@ class AgFeatureGridExample extends React.Component {
map={this.map}
attributeBlacklist={['gml_id', 'USE', 'RS', 'RS_ALT']}
columnDefs={{
'GEN': {
GEN: {
headerName: 'Name',
cellRenderer: 'nameColumnRenderer',
sortable: true,
filter: true,
resizable: true
},
'SHAPE_LENG': {
SHAPE_LENG: {
headerName: 'Length',
cellRenderer: 'mathRoundRenderer',
sortable: true,
filter: true,
resizable: true
},
'SHAPE_AREA': {
SHAPE_AREA: {
headerName: 'Area',
cellRenderer: 'mathRoundRenderer',
sortable: true,
Expand Down
8 changes: 4 additions & 4 deletions src/Grid/AgFeatureGrid/AgFeatureGrid.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ describe('<AgFeatureGrid />', () => {
const got = wrapper.instance().getColumnDefs();

const exp = [{
'field': 'id',
'headerName': 'id'
field: 'id',
headerName: 'id'
}, {
'field': 'name',
'headerName': 'name'
field: 'name',
headerName: 'name'
}];

expect(got).toEqual(exp);
Expand Down
8 changes: 4 additions & 4 deletions src/Grid/FeatureGrid/FeatureGrid.example.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class FeatureGridExample extends React.Component {
selectable={true}
attributeBlacklist={['gml_id', 'USE', 'RS', 'RS_ALT']}
columnDefs={{
'GEN': {
GEN: {
title: 'Name',
render: nameColumnRenderer,
sorter: (a, b) => {
Expand All @@ -72,11 +72,11 @@ class FeatureGridExample extends React.Component {
},
defaultSortOrder: 'ascend'
},
'SHAPE_LENG': {
SHAPE_LENG: {
title: 'Length',
render: val => Math.round(val)
},
'SHAPE_AREA': {
SHAPE_AREA: {
title: 'Area',
render: val => Math.round(val)
}
Expand Down Expand Up @@ -305,7 +305,7 @@ class RemoteFeatureGrid extends React.Component {
}}
onChange={this.onTableChange.bind(this)}
columnDefs={{
'name': {
name: {
sorter: true,
filterDropdown: (
<div style={{
Expand Down
2 changes: 1 addition & 1 deletion src/Grid/PropertyGrid/PropertyGrid.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('<PropertyGrid />', () => {
it('passes style prop', () => {
const props = {
style: {
'backgroundColor': 'yellow'
backgroundColor: 'yellow'
},
feature: testFeature
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class LoadingTreeExample extends React.Component {
source: new OlSourceTileWMS({
url: 'https://ows.terrestris.de/osm/service',
params: {
'LAYERS': 'SRTM30-Contour'
LAYERS: 'SRTM30-Contour'
}
})
})
Expand Down
4 changes: 2 additions & 2 deletions src/LayerTree/LayerTree.example.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class LayerTreeExample extends React.Component {
source: new OlSourceTileWMS({
url: 'https://ows.terrestris.de/osm/service',
params: {
'LAYERS': 'OSM-Overlay-WMS'
LAYERS: 'OSM-Overlay-WMS'
}
})
}),
Expand All @@ -42,7 +42,7 @@ class LayerTreeExample extends React.Component {
source: new OlSourceTileWMS({
url: 'https://ows.terrestris.de/osm/service',
params: {
'LAYERS': 'SRTM30-Contour'
LAYERS: 'SRTM30-Contour'
}
})
})
Expand Down
6 changes: 3 additions & 3 deletions src/Legend/Legend.example.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class LegendExample extends React.Component {
name: 'OSM-WMS',
source: new OlSourceTileWMS({
url: 'https://ows.terrestris.de/osm-gray/service',
params: {'LAYERS': 'OSM-WMS', 'TILED': true},
params: {LAYERS: 'OSM-WMS', TILED: true},
serverType: 'geoserver'
})
});
Expand All @@ -32,7 +32,7 @@ class LegendExample extends React.Component {
name: 'States (USA)',
source: new OlSourceTileWMS({
url: 'https://ahocevar.com/geoserver/wms',
params: {'LAYERS': 'usa:states', 'TILED': true},
params: {LAYERS: 'usa:states', TILED: true},
serverType: 'geoserver'
})
});
Expand All @@ -42,7 +42,7 @@ class LegendExample extends React.Component {
legendUrl: 'https://www.koeln.de/files/images/Karnevalstrikot_Spieler_270.jpg',
source: new OlSourceTileWMS({
url: 'https://ahocevar.com/geoserver/wms',
params: {'LAYERS': 'ne:ne_10m_populated_places', 'TILED': true, 'TRANSPARENT': 'true'},
params: {LAYERS: 'ne:ne_10m_populated_places', TILED: true, TRANSPARENT: 'true'},
serverType: 'geoserver'
})
});
Expand Down

0 comments on commit 2500acb

Please sign in to comment.