Skip to content

Commit

Permalink
Merge pull request #44 from aarranz/task/use-let-and-const
Browse files Browse the repository at this point in the history
Switch code to use let and const
  • Loading branch information
aarranz committed Jul 6, 2021
2 parents 655b328 + 3c5f2f9 commit 072ec2c
Show file tree
Hide file tree
Showing 8 changed files with 243 additions and 228 deletions.
9 changes: 9 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,15 @@
"curly": [
2,
"all"
],
"prefer-const": [
"error"
],
"no-var": [
"error"
],
"no-const-assign": [
"error"
]
}
}
9 changes: 9 additions & 0 deletions .eslintrc-jasmine
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,15 @@
"curly": [
2,
"all"
],
"prefer-const": [
"error"
],
"no-var": [
"error"
],
"no-const-assign": [
"error"
]
}
}
6 changes: 3 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

var ConfigParser = require('wirecloud-config-parser');
var parser = new ConfigParser('src/config.xml');
const ConfigParser = require('wirecloud-config-parser');
const parser = new ConfigParser('src/config.xml');

module.exports = function (grunt) {

Expand All @@ -40,7 +40,7 @@ module.exports = function (grunt) {
options: {
configFile: '.eslintrc-jasmine'
},
src: ['src/test/**/*.js', '!src/test/fixtures/']
src: ['tests/**/*Spec.js', '!tests/fixtures/']
}
},

Expand Down
1 change: 1 addition & 0 deletions src/doc/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
events).
- Repaint popovers when moving/zooming the map (when using sticky events).
- Fix placement of popovers when icon anchor is different to `[0.5, 1]`
- Switch code to use let and const


## v1.2.3 (2021-03-25)
Expand Down
4 changes: 2 additions & 2 deletions src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

"use strict";

var parseInputEndpointData = function parseInputEndpointData(data) {
const parseInputEndpointData = function parseInputEndpointData(data) {
if (typeof data === "string") {
try {
data = JSON.parse(data);
Expand All @@ -34,7 +34,7 @@
return data;
};

var widget = new Widget('body', '#incoming-modal');
const widget = new Widget('body', '#incoming-modal');
widget.init();

MashupPlatform.prefs.registerCallback((new_values) => {
Expand Down
Loading

0 comments on commit 072ec2c

Please sign in to comment.