Added eslint. To lint, npm run lint.

Linted the entire project. Using different rules for the script files
as there are a lot of undefined variables just because of the way the
DOM's global scope works.

Mostly just code cleanup, however the linter did catch a minor bug with
a settings regex. That has been corrected.
This commit is contained in:
Daniel Scalzi
2018-07-22 13:31:15 -04:00
parent ededf85892
commit 810e81521c
18 changed files with 1205 additions and 261 deletions

View File

@@ -210,11 +210,11 @@ class ProcessBuilder {
constructJVMArguments(mods, tempNativePath){
let args = ['-Xmx' + ConfigManager.getMaxRAM(),
'-Xms' + ConfigManager.getMinRAM(),
'-Djava.library.path=' + tempNativePath,
'-cp',
this.classpathArg(mods, tempNativePath).join(process.platform === 'win32' ? ';' : ':'),
this.forgeData.mainClass]
'-Xms' + ConfigManager.getMinRAM(),
'-Djava.library.path=' + tempNativePath,
'-cp',
this.classpathArg(mods, tempNativePath).join(process.platform === 'win32' ? ';' : ':'),
this.forgeData.mainClass]
if(process.platform === 'darwin'){
args.unshift('-Xdock:name=WesterosCraft')
@@ -241,13 +241,13 @@ class ProcessBuilder {
for(let i=0; i<mcArgs.length; ++i){
if(argDiscovery.test(mcArgs[i])){
const identifier = mcArgs[i].match(argDiscovery)[1]
let val = null;
let val = null
switch(identifier){
case 'auth_player_name':
val = this.authUser.displayName
break
case 'version_name':
//val = versionData.id
//val = versionData.id
val = this.server.getID()
break
case 'game_directory':
@@ -273,7 +273,7 @@ class ProcessBuilder {
break
}
if(val != null){
mcArgs[i] = val;
mcArgs[i] = val
}
}
}