Skip to content

Commit a35f010

Browse files
author
Hannah
authored
Merge pull request #7809 from AnalyticalGraphicsInc/eslint-updates
eslint configuration updates and fixes
2 parents 284b70b + 8034629 commit a35f010

File tree

8 files changed

+35
-28
lines changed

8 files changed

+35
-28
lines changed

Apps/Sandcastle/gallery/Imagery Layers Split.html

+12-12
Original file line numberDiff line numberDiff line change
@@ -69,31 +69,31 @@
6969
var moveActive = false;
7070

7171
function move(movement) {
72-
if(!moveActive) {
73-
return;
74-
}
75-
76-
var relativeOffset = movement.endPosition.x ;
77-
var splitPosition = (slider.offsetLeft + relativeOffset) / slider.parentElement.offsetWidth;
78-
slider.style.left = 100.0 * splitPosition + '%';
79-
viewer.scene.imagerySplitPosition = splitPosition;
72+
if(!moveActive) {
73+
return;
74+
}
75+
76+
var relativeOffset = movement.endPosition.x ;
77+
var splitPosition = (slider.offsetLeft + relativeOffset) / slider.parentElement.offsetWidth;
78+
slider.style.left = 100.0 * splitPosition + '%';
79+
viewer.scene.imagerySplitPosition = splitPosition;
8080
}
8181

8282
handler.setInputAction(function() {
83-
moveActive = true;
83+
moveActive = true;
8484
}, Cesium.ScreenSpaceEventType.LEFT_DOWN);
8585
handler.setInputAction(function() {
86-
moveActive = true;
86+
moveActive = true;
8787
}, Cesium.ScreenSpaceEventType.PINCH_START);
8888

8989
handler.setInputAction(move, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
9090
handler.setInputAction(move, Cesium.ScreenSpaceEventType.PINCH_MOVE);
9191

9292
handler.setInputAction(function() {
93-
moveActive = false;
93+
moveActive = false;
9494
}, Cesium.ScreenSpaceEventType.LEFT_UP);
9595
handler.setInputAction(function() {
96-
moveActive = false;
96+
moveActive = false;
9797
}, Cesium.ScreenSpaceEventType.PINCH_END);
9898

9999
//Sandcastle_End

Source/Scene/Vector3DTilePolygons.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ define([
285285
var minimumHeights = polygons._polygonMinimumHeights;
286286
var maximumHeights = polygons._polygonMaximumHeights;
287287
if (defined(minimumHeights) && defined(maximumHeights)) {
288-
minimumHeights = arraySlice(minimumHeights);
289-
maximumHeights = arraySlice(maximumHeights);
288+
minimumHeights = arraySlice(minimumHeights);
289+
maximumHeights = arraySlice(maximumHeights);
290290

291291
transferrableObjects.push(minimumHeights.buffer, maximumHeights.buffer);
292292
parameters.minimumHeights = minimumHeights;

Specs/DataSources/KmlDataSourceSpec.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -3866,16 +3866,16 @@ defineSuite([
38663866
});
38673867
});
38683868

3869-
it('can load styles from a KML file with namespaces', function() {
3870-
return KmlDataSource.load('Data/KML/namespaced.kml', options).then(function(dataSource) {
3871-
console.debug(dataSource.entities.values[2]);
3872-
var polyline = dataSource.entities.values[2].polyline;
3873-
var expectedColor = Color.fromBytes(0xff, 0x00, 0xff, 0x00);
3874-
var polylineColor = polyline.material.color.getValue();
3875-
expect(polylineColor).toEqual(expectedColor);
3876-
expect(polyline.width.getValue()).toEqual(10);
3877-
});
3878-
});
3869+
it('can load styles from a KML file with namespaces', function() {
3870+
return KmlDataSource.load('Data/KML/namespaced.kml', options).then(function(dataSource) {
3871+
console.debug(dataSource.entities.values[2]);
3872+
var polyline = dataSource.entities.values[2].polyline;
3873+
var expectedColor = Color.fromBytes(0xff, 0x00, 0xff, 0x00);
3874+
var polylineColor = polyline.material.color.getValue();
3875+
expect(polylineColor).toEqual(expectedColor);
3876+
expect(polyline.width.getValue()).toEqual(10);
3877+
});
3878+
});
38793879

38803880
it('Boolean values can use true string', function() {
38813881
var kml = '<?xml version="1.0" encoding="UTF-8"?>\
@@ -3960,7 +3960,7 @@ defineSuite([
39603960
return KmlDataSource.load(parser.parseFromString(kml, 'text/xml'), options).then(function(dataSource) {
39613961
expect(dataSource.entities.values.length).toEqual(1);
39623962
expect(console.warn.calls.count()).toEqual(1);
3963-
expect(console.warn).toHaveBeenCalledWith('KML - Unsupported Icon refreshMode: onInterval');
3963+
expect(console.warn).toHaveBeenCalledWith('KML - Unsupported Icon refreshMode: onInterval');
39643964
});
39653965
});
39663966

Specs/customizeJasmine.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ define([
3131
define(deps, function() {
3232
var args = arguments;
3333
if (focus) {
34-
fdescribe(name, function() {
34+
fdescribe(name, function() { //eslint-disable-line
3535
suite.apply(null, args);
3636
}, categories);
3737
} else {

Tools/eslint-config-cesium/CHANGES.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Change Log
22
==========
33

4+
### 7.0.0 - 2019-05-03
5+
* Update Node ecmaVersion to '2019'.
6+
* Enable [no-tabs](https://eslint.org/docs/rules/no-tabs).
7+
* Enabled [no-restricted-globals](https://eslint.org/docs/rules/no-restricted-globals) for jasmine `fit` and `fdescribe`.
8+
49
### 6.0.1 - 2019-01-23
510
* Allow ES6 global variables in Node.js code.
611

Tools/eslint-config-cesium/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ module.exports = {
3737
'no-multiple-empty-lines': ['error', { max: 1, maxEOF: 1 }],
3838
'no-new': 'error',
3939
'no-sequences': 'error',
40+
'no-tabs': 'error',
4041
'no-trailing-spaces': 'error',
4142
'no-undef': 'error',
4243
'no-undef-init': 'error',
44+
'no-restricted-globals': ["error", "fdescribe", "fit"],
4345
'no-unused-expressions': 'error',
4446
'no-unused-vars': ['error', {vars: 'all', args: 'all'}],
4547
'no-useless-escape': 'off',

Tools/eslint-config-cesium/node.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = {
77
es6: true
88
},
99
parserOptions: {
10-
ecmaVersion: 2017
10+
ecmaVersion: 2019
1111
},
1212
rules: {
1313
'global-require': 'error',

Tools/eslint-config-cesium/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-config-cesium",
3-
"version": "6.0.1",
3+
"version": "7.0.0",
44
"description": "ESLint shareable configs for Cesium",
55
"homepage": "http://cesiumjs.org",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)