Skip to content

Commit f9c7e33

Browse files
committed
Updated ESlint dependencies with lint corrections
1 parent 449c77e commit f9c7e33

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

bin/template/cordova/Api.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,9 @@ Api.prototype.prepare = function (cordovaProject, options) {
211211
"sizes": "128x128"
212212
} ******/
213213
// ?Is it worth looking at file extentions?
214-
return {'src': icon.src,
214+
return { 'src': icon.src,
215215
'type': 'image/png',
216-
'sizes': (icon.width + 'x' + icon.height)};
216+
'sizes': (icon.width + 'x' + icon.height) };
217217
});
218218
manifestJson.icons = manifestIcons;
219219

@@ -230,7 +230,7 @@ Api.prototype.prepare = function (cordovaProject, options) {
230230
}
231231

232232
// get start_url
233-
var contentNode = this.config.doc.find('content') || {'attrib': {'src': 'index.html'}}; // sensible default
233+
var contentNode = this.config.doc.find('content') || { 'attrib': { 'src': 'index.html' } }; // sensible default
234234
manifestJson.start_url = contentNode.attrib.src;
235235

236236
// now we get some values from start_url page ...

bin/template/cordova/lib/run.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,18 @@ module.exports.run = function (args) {
4646
}
4747

4848
var server = cordovaServe();
49-
server.servePlatform('browser', {port: args.port, noServerInfo: true, noLogOutput: args.noLogOutput})
49+
server.servePlatform('browser', { port: args.port, noServerInfo: true, noLogOutput: args.noLogOutput })
5050
.then(function () {
5151
if (!startPage) {
5252
// failing all else, set the default
5353
startPage = 'index.html';
5454
}
55-
var projectUrl = url.resolve('http://localhost:' + server.port + '/', startPage);
55+
56+
var projectUrl = (new url.URL(`http://localhost:${server.port}/${startPage}`)).href;
57+
5658
console.log('startPage = ' + startPage);
5759
console.log('Static file server running @ ' + projectUrl + '\nCTRL + C to shut down');
58-
return server.launchBrowser({'target': args.target, 'url': projectUrl});
60+
return server.launchBrowser({ 'target': args.target, 'url': projectUrl });
5961
})
6062
.catch(function (error) {
6163
console.log(error.message || error.toString());

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"apache"
1818
],
1919
"scripts": {
20-
"eslint": "eslint bin && eslint spec",
20+
"eslint": "eslint bin spec",
2121
"jasmine": "jasmine",
2222
"test": "npm run eslint && npm run jasmine"
2323
},
@@ -28,13 +28,13 @@
2828
"shelljs": "^0.5.3"
2929
},
3030
"devDependencies": {
31-
"eslint": "^4.0.0",
32-
"eslint-config-semistandard": "^11.0.0",
33-
"eslint-config-standard": "^10.2.1",
34-
"eslint-plugin-import": "^2.3.0",
35-
"eslint-plugin-node": "^5.0.0",
36-
"eslint-plugin-promise": "^3.5.0",
37-
"eslint-plugin-standard": "^3.0.1",
31+
"eslint": "^5.12.0",
32+
"eslint-config-semistandard": "^13.0.0",
33+
"eslint-config-standard": "^12.0.0",
34+
"eslint-plugin-import": "^2.14.0",
35+
"eslint-plugin-node": "^8.0.1",
36+
"eslint-plugin-promise": "^4.0.1",
37+
"eslint-plugin-standard": "^4.0.0",
3838
"jasmine": "^2.5.3",
3939
"tmp": "^0.0.26"
4040
},

0 commit comments

Comments
 (0)