Enable eslint rule 'require-yield'

Enable recommended rule 'require-yield' [1] and manually fix violations.

[1] https://eslint.org/docs/latest/rules/require-yield

Ref: #8068
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
Ralph Sennhauser
2025-06-17 16:19:20 +02:00
parent 14bb7730fe
commit 91df65d64c
9 changed files with 17 additions and 0 deletions
@@ -5,6 +5,8 @@ export function* generateMap()
{
globalThis.g_Map = new RandomMap(0, "grass1_spring");
yield 50;
placePlayerBases({
"PlayerPlacement": playerPlacementCircle(fractionToTiles(0.39))
});
@@ -15,6 +15,8 @@ export function* generateMap()
g_MapSettings = { "Size": 512 };
globalThis.g_Map = new RandomMap(0, "blackness");
yield 50;
const tileClass = new TileClass(g_Map.getSize());
const addedPos = new Vector2D(5, 0);
@@ -47,6 +47,8 @@ export function* generateMap()
TS_ASSERT(area.contains(new Vector2D(0, 0)));
}
yield 50;
{
// Contains points outside map disk range on CircularMap
g_MapSettings = { "Size": 512, "CircularMap": true };
@@ -15,6 +15,8 @@ export function* generateMap()
g_MapSettings = { "Size": 512 };
globalThis.g_Map = new RandomMap(0, "blackness");
yield 50;
const min = new Vector2D(4, 4);
const max = new Vector2D(10, 10);
@@ -15,6 +15,8 @@ export function* generateMap()
g_MapSettings = { "Size": 512 };
globalThis.g_Map = new RandomMap(0, "blackness");
yield 50;
const min = new Vector2D(5, 5);
const max = new Vector2D(7, 7);
@@ -21,6 +21,8 @@ export function* generateMap()
const minHeight = 20;
const maxHeight = 25;
yield 50;
// Test SmoothingPainter
{
globalThis.g_Map = new RandomMap(0, "blackness");
@@ -15,6 +15,8 @@ export function* generateMap()
g_MapSettings = { "Size": 512 };
globalThis.g_Map = new RandomMap(0, "blackness");
yield 50;
// Test that that it checks by value, not by reference
{
const tileClass = new TileClass(2);
@@ -5,6 +5,8 @@ export function* generateMap()
{
globalThis.g_Map = new RandomMap(0, "grass1");
yield 50;
/**
* Demonstration code for wall placement.
*
+1
View File
@@ -82,6 +82,7 @@ const configEslintRecommended = {
"no-useless-escape": "warn",
"no-with": "warn",
"use-isnan": "warn",
"require-yield": "warn",
"valid-typeof": "warn",
}
};