Skip to content

Commit 983166f

Browse files
committed
【update】eslint constructor-super review by luox
1 parent 9efad63 commit 983166f

File tree

8 files changed

+4
-22
lines changed

8 files changed

+4
-22
lines changed

.eslintrc.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ module.exports = {
3636
"no-redeclare": "warn",
3737
//允许出现未使用过的变量
3838
"no-unused-vars": "warn",
39-
//不要求在构造函数中有 super() 的调用
40-
"constructor-super": "off",
4139
//允许在嵌套的块中出现function声明
4240
"no-inner-declarations": "off",
4341
//强制数组方法的回调函数中有 return 语句

src/common/iServer/QueryByBoundsParameters.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ import {QueryParameters} from './QueryParameters';
2727
export class QueryByBoundsParameters extends QueryParameters {
2828

2929
constructor(options) {
30-
if (!options) {
31-
return;
32-
}
30+
options = options || {};
3331
super(options);
3432
/**
3533
* @member {boolean} [SuperMap.QueryByBoundsParameters.prototype.returnContent=true]

src/common/iServer/QueryByDistanceParameters.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ export class QueryByDistanceParameters extends QueryParameters {
3131

3232

3333
constructor(options) {
34-
if (!options) {
35-
return;
36-
}
34+
options = options || {};
3735
super(options);
3836
/**
3937
* @member {number} [SuperMap.QueryByDistanceParameters.prototype.distance=0]

src/common/iServer/QueryByGeometryParameters.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ export class QueryByGeometryParameters extends QueryParameters {
3232

3333

3434
constructor(options) {
35-
if (!options) {
36-
return;
37-
}
35+
options = options || {};
3836
super(options);
3937

4038
/**

src/common/iServer/QueryBySQLParameters.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ import {QueryParameters} from './QueryParameters';
2727
export class QueryBySQLParameters extends QueryParameters {
2828

2929
constructor(options) {
30-
if (!options) {
31-
return;
32-
}
30+
options = options || {};
3331
super(options);
3432
/**
3533
* @member {boolean} [SuperMap.QueryBySQLParameters.prototype.returnContent=true]

src/leaflet/services/WebPrintingJobService.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export var WebPrintingJobService = ServiceBase.extend({
4141
return;
4242
}
4343
var me = this;
44-
console.log(me.url);
4544
var webPrintingService = new WebPrintingService(me.url, {
4645
proxy: me.options.proxy,
4746
withCredentials: me.options.withCredentials,

src/openlayers/mapping/ImageSuperMapRest.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ import TileGrid from 'ol/tilegrid/TileGrid';
3535
*/
3636
export class ImageSuperMapRest extends TileImage {
3737
constructor(options) {
38-
if (options.url === undefined) {
39-
return;
40-
}
4138
options.attributions =
4239
options.attributions || "Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span> with <a href='https://iclient.supermap.io/'>© SuperMap iClient</a>"
4340

src/openlayers/mapping/TileSuperMapRest.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ import TileGrid from 'ol/tilegrid/TileGrid';
3636
export class TileSuperMapRest extends TileImage {
3737
constructor(options) {
3838
options = options || {};
39-
if (options.url === undefined) {
40-
return;
41-
}
42-
4339
options.attributions =
4440
options.attributions ||
4541
"Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span> with <span>© <a href='https://iclient.supermap.io' target='_blank'>SuperMap iClient</a></span>";

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy