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:
Ralph Sennhauser
2025-05-04 21:29:31 +02:00
parent 3916fab66f
commit e218cfa170
@@ -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");