From 3a2d75af655d27460615c2e29370ad0dd2dc77a9 Mon Sep 17 00:00:00 2001 From: Ralph Sennhauser Date: Mon, 12 May 2025 22:02:00 +0200 Subject: [PATCH] Fix eslint rule 'no-irregular-whitespace' Manual fixes needed for: eslint --no-config-lookup --rule '"no-irregular-whitespace": 1' Ref: #7812 Signed-off-by: Ralph Sennhauser --- binaries/data/mods/mod/gui/modmod/modmod.js | 20 +------------------ .../data/mods/mod/gui/modmod/validatemod.js | 8 ++++---- binaries/data/mods/mod/hwdetect/hwdetect.js | 2 +- .../simulation/components/ResourceGatherer.js | 1 + 4 files changed, 7 insertions(+), 24 deletions(-) diff --git a/binaries/data/mods/mod/gui/modmod/modmod.js b/binaries/data/mods/mod/gui/modmod/modmod.js index 5308e15832..73ed374e3e 100644 --- a/binaries/data/mods/mod/gui/modmod/modmod.js +++ b/binaries/data/mods/mod/gui/modmod/modmod.js @@ -3,25 +3,7 @@ */ /** - * A mod is defined by a mod.json file, for example - * { - * "name": "0ad", - * "version": "0.28.0", - * "label": "0 A.D. - Empires Ascendant", - * "url": "https://wildfiregames.com/", - * "description": "A free, open-source, historical RTS game.", - * "dependencies": [] - * } - * - * Or: - * { - * "name": "mod2", - * "label": "Mod 2", - * "version": "1.1", - * "description": "", - * "dependencies": ["0ad<=0.28.0", "rote"] - * } - * + * A mod is defined by a mod.json file. * A mod is identified by the directory name. * A mod must define the "name", "version", "label", "description" and "dependencies" property. * The "url" property is optional. diff --git a/binaries/data/mods/mod/gui/modmod/validatemod.js b/binaries/data/mods/mod/gui/modmod/validatemod.js index 5369b0926b..ac7fe48ee2 100644 --- a/binaries/data/mods/mod/gui/modmod/validatemod.js +++ b/binaries/data/mods/mod/gui/modmod/validatemod.js @@ -1,5 +1,5 @@ const g_ModProperties = { - // example: "0ad" + // example: "community-mod" "name": { "required": true, "type": "string", @@ -11,19 +11,19 @@ const g_ModProperties = { "type": "string", "validate": validateVersion }, - // example: ["0ad<=0.0.16", "rote"] + // example: ["0ad<=0.0.28", "rote"] "dependencies": { "required": true, "type": "object", "validate": validateDependencies }, - // example: "0 A.D. - Empires Ascendant" + // example: "Community Mod" "label": { "required": true, "type": "string", "validate": validateLabel }, - // example: "A free, open-source, historical RTS game." + // example: "The Community Mod is a community-led effort to improve the gameplay." "description": { "required": true, "type": "string" diff --git a/binaries/data/mods/mod/hwdetect/hwdetect.js b/binaries/data/mods/mod/hwdetect/hwdetect.js index eb766db7ed..6bc676e2d3 100644 --- a/binaries/data/mods/mod/hwdetect/hwdetect.js +++ b/binaries/data/mods/mod/hwdetect/hwdetect.js @@ -219,7 +219,7 @@ function RunDetection(settings) if (GL_VERSION.match(/^[3-9]/)) enable_glsl = true; - // Enable GLSL on OpenGL ES 2.0+, which doesn’t support the fixed + // Enable GLSL on OpenGL ES 2.0+, which doesn’t support the fixed // function fallbacks if (GL_VERSION.match(/^OpenGL ES /)) enable_glsl = true; diff --git a/binaries/data/mods/public/simulation/components/ResourceGatherer.js b/binaries/data/mods/public/simulation/components/ResourceGatherer.js index ea33a05540..f4e5ddf006 100644 --- a/binaries/data/mods/public/simulation/components/ResourceGatherer.js +++ b/binaries/data/mods/public/simulation/components/ResourceGatherer.js @@ -480,6 +480,7 @@ ResourceGatherer.prototype.OnValueModification = function(msg) if (msg.component != "ResourceGatherer") return; + // eslint-disable-next-line no-irregular-whitespace // NB: at the moment, 0 A.D. always uses the fast path, the other is mod support. if (msg.valueNames.length === 1) {