mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 01:04:06 +00:00
Fix eslint rule 'dot-notation'
For consistency with other commandline args containing '-' which can't make use of the dot notation disable the rule for affected lines. eslint --no-config-lookup --fix --rule '"dot-notation": 1' Ref: #7812 Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
@@ -64,12 +64,14 @@
|
||||
*/
|
||||
function parseCmdLineArgs(settings, cmdLineArgs)
|
||||
{
|
||||
// eslint-disable-next-line dot-notation
|
||||
const mapType = cmdLineArgs['autostart'].substring(0, cmdLineArgs['autostart'].indexOf('/'));
|
||||
settings.map.setType({
|
||||
"scenarios": "scenario",
|
||||
"random": "random",
|
||||
"skirmishes": "skirmish",
|
||||
}[mapType]);
|
||||
// eslint-disable-next-line dot-notation
|
||||
settings.map.selectMap("maps/" + cmdLineArgs['autostart']);
|
||||
settings.mapSize.setSize(+(cmdLineArgs['autostart-size'] ?? 192));
|
||||
settings.biome.setBiome(cmdLineArgs['autostart-biome'] || "random");
|
||||
|
||||
Reference in New Issue
Block a user