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:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user