Skip to content

Commit 6b49b4d

Browse files
Update ESLint settings.
1 parent 9868d5a commit 6b49b4d

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

.eslintrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"root": true,
33
"env": {
44
"browser": true,
5-
"es6": true
5+
"es6": true,
6+
"node": true
67
},
78
"parser": "@babel/eslint-parser",
89
"parserOptions": {

util - http-server/server.js

+1-14
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
/*! European Union Public License version 1.2 !*/
22
/*! Copyright © 2018 Rick Beerendonk !*/
33

4-
/* global process, require */
54
/* eslint-disable no-console */
65

76
const childProcess = require('child_process');
87

9-
const portHttp = process.argv[2] || 8080;
10-
//const portRest = +portHttp + 1;
11-
let filePath = process.argv[3];
8+
const [, , portHttp = 8080, filePath] = process.argv;
129
const basePath = process.cwd();
1310

14-
//console.log('portHttp: ' + portHttp);
15-
//console.log('portRest: ' + portRest);
16-
//console.log('filePath: ' + filePath);
17-
//console.log('basePath: ' + basePath);
18-
1911
// If filePath is given, we'll open that path in the browser
2012
let extraUri = '';
2113
if (filePath && filePath.toLowerCase().startsWith(basePath.toLowerCase())) {
@@ -26,11 +18,6 @@ if (filePath && filePath.toLowerCase().startsWith(basePath.toLowerCase())) {
2618
const serverUri = `http://localhost:${portHttp}`;
2719
const totalUri = `${serverUri}${extraUri}`;
2820

29-
//console.log('serverUri: ' + serverUri);
30-
//console.log('extraPath: ' + extraPath);
31-
//console.log('extraUri: ' + extraUri);
32-
//console.log('totalUri: ' + totalUri);
33-
3421
// Start server
3522
// See: https://github.com/indexzero/http-server/
3623
/*const httpChild =*/ childProcess.spawn(

0 commit comments

Comments
 (0)