mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-08-15 14:43:32 -07: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:
parent
3916fab66f
commit
e218cfa170
1 changed files with 2 additions and 0 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue