|
|
/apps/mc-api/src/@apis/index.ts
|
0 problems
|
|
|
/apps/mc-api/src/@apis/response.ts
|
0 problems
|
|
|
/apps/mc-api/src/app.controller.ts
|
0 problems
|
|
|
/apps/mc-api/src/app.module.ts
|
0 problems
|
|
|
/apps/mc-api/src/app.service.ts
|
0 problems
|
|
|
/apps/mc-api/src/database.config.ts
|
0 problems
|
|
|
/apps/mc-api/src/main.ts
|
0 problems
|
|
|
/apps/mc-api/src/models/deck.ts
|
0 problems
|
|
|
/apps/mc-api/src/models/encounter.ts
|
0 problems
|
|
|
/apps/mc-api/src/models/enums.ts
|
0 problems
|
|
|
/apps/mc-api/src/models/hero.ts
|
0 problems
|
|
|
/apps/mc-api/src/models/index.ts
|
0 problems
|
|
|
/apps/mc-api/src/models/modular-set.ts
|
0 problems
|
|
|
/apps/mc-api/src/models/pack.ts
|
0 problems
|
|
|
/apps/mc-api/src/models/scenario.ts
|
0 problems
|
|
|
/apps/mc-api/src/modules/decks/deck.entity.ts
|
0 problems
|
|
|
/apps/mc-api/src/modules/decks/decks.module.ts
|
0 problems
|
|
|
/apps/mc-api/src/modules/decks/decks.service.ts
|
0 problems
|
|
|
/apps/mc-api/src/modules/encounters/encounter.entity.ts
|
0 problems
|
|
|
/apps/mc-api/src/modules/encounters/encounters.module.ts
|
0 problems
|
|
|
/apps/mc-api/src/modules/heroes/hero.entity.ts
|
0 problems
|
|
|
/apps/mc-api/src/modules/heroes/heroes.module.ts
|
0 problems
|
|
|
/apps/mc-api/src/modules/heroes/heroes.service.ts
|
0 problems
|
|
|
/apps/mc-api/src/modules/modular-sets/modular-set.entity.ts
|
0 problems
|
|
|
/apps/mc-api/src/modules/modular-sets/modular-sets.module.ts
|
0 problems
|
|
|
/apps/mc-api/src/modules/modular-sets/modular-sets.service.ts
|
0 problems
|
|
|
/apps/mc-api/src/modules/packs/pack.entity.ts
|
0 problems
|
|
|
/apps/mc-api/src/modules/packs/packs.module.ts
|
0 problems
|
|
|
/apps/mc-api/src/modules/packs/packs.service.ts
|
0 problems
|
|
|
/apps/mc-api/src/modules/scenarios/scenario.entity.ts
|
0 problems
|
|
|
/apps/mc-api/src/modules/scenarios/scenarios.module.ts
|
0 problems
|
|
|
/apps/mc-api/src/modules/scenarios/scenarios.service.ts
|
0 problems
|
|
|
/apps/mc/src/@apis/index.ts
|
0 problems
|
|
|
/apps/mc/src/@apis/response.ts
|
0 problems
|
|
|
/apps/mc/src/app.d.ts
|
0 problems
|
|
|
/apps/mc/src/lib/data.svelte
|
0 problems
|
|
|
/apps/mc/src/lib/functions.ts
|
0 problems
|
|
|
/apps/mc/src/lib/interface.ts
|
0 problems
|
|
|
/apps/mc/src/lib/navigation.svelte
|
0 problems
|
|
|
/apps/mc/src/lib/progression.svelte
|
0 problems
|
|
|
/apps/mc/src/lib/random.svelte
|
2 problems (0 errors, 2 warnings)
|
| Line |
Source |
| 1 |
<svelte:options tag="mc-suggested" /> |
| 2 |
|
| 3 |
<script lang="ts"> |
| 4 |
import { weightedRandom } from "@jga/algorithms"; |
| 5 |
|
| 6 |
import type { Encounter, Hero, ModularSet, Scenario } from "$models"; |
| 7 |
import { DifficultyEnum, ResultEnum } from "$models"; |
| 8 |
|
| 9 |
import { EncountersService, HeroesService, ModularSetsService, ScenariosService } from "$services"; |
| 10 |
|
| 11 |
import { excludeHeroes, getWeightedData, notEmpty } from "./functions"; |
| 12 |
|
| 13 |
import Button from "$ui/button/src/button.svelte"; |
| 14 |
import Select from "$lib/select.svelte"; |
| 15 |
import Title from "$lib/title.svelte"; |
| 16 |
|
| 17 |
// eslint-disable-next-line import/no-mutable-exports |
| 18 |
export let heroes: Hero[] = []; |
| 19 |
// eslint-disable-next-line import/no-mutable-exports |
| 20 |
export let encounters: Encounter[] = []; |
| 21 |
// eslint-disable-next-line import/no-mutable-exports |
| 22 |
export let modules: ModularSet[] = []; |
| 23 |
// eslint-disable-next-line import/no-mutable-exports |
| 24 |
export let scenarios: Scenario[] = []; |
| 25 |
|
| 26 |
let gamesScenarios: Map<string, number>; |
| 27 |
let unorderedScenarios: Map<string, number>; |
| Warning |
Row 28, Column 9: "'orderedScenarios' is defined but never used."
@typescript-eslint/no-unused-vars
|
| 28 |
let orderedScenarios: Map<string, number>; |
| 29 |
|
| 30 |
let scenariosWinEncounters: Map<string, Hero[]>; |
| 31 |
let randomEncounters: Partial<Encounter>[]; |
| 32 |
|
| 33 |
$: { |
| 34 |
// order scenarios by play count |
| 35 |
// eslint-disable-next-line prefer-const |
| 36 |
gamesScenarios = encounters |
| 37 |
.map((encounter) => encounter.scenario.name) |
| 38 |
.reduce((acc, e) => acc.set(e, (acc.get(e) || 0) + 1), new Map()); |
| 39 |
|
| 40 |
// eslint-disable-next-line prefer-const |
| Warning |
Row 41, Column 9: "'unorderedScenarios' is assigned a value but never used."
@typescript-eslint/no-unused-vars
|
| 41 |
unorderedScenarios = scenarios.reduce((acc, e) => { |
| 42 |
acc.set(e, (acc.get(e) || 0) + (gamesScenarios.get(e.name) || 0)); |
| 43 |
|
| 44 |
return acc; |
| 45 |
}, new Map()); |
| 46 |
|
| 47 |
// eslint-disable-next-line prefer-const |
| 48 |
scenariosWinEncounters = encounters |
| 49 |
.filter((encounter) => encounter.result === ResultEnum.WON) |
| 50 |
.reduce((acc, e) => { |
| 51 |
if (!acc.has(e.scenario.name)) { |
| 52 |
acc.set(e.scenario.name, []); |
| 53 |
} |
| 54 |
|
| 55 |
const newHeroes = acc.get(e.scenario.name); |
| 56 |
[e] |
| 57 |
.flatMap((encounter) => encounter.heroes) |
| 58 |
.filter((hero) => hero != null) |
| 59 |
.map((hero) => hero.name) |
| 60 |
.filter((hero, i, array) => array.indexOf(hero) === i) |
| 61 |
.forEach((hero) => newHeroes.push(hero)); |
| 62 |
|
| 63 |
acc.set(e.scenario.name, newHeroes.sort()); |
| 64 |
|
| 65 |
return acc; |
| 66 |
}, new Map()); |
| 67 |
|
| 68 |
// eslint-disable-next-line prefer-const |
| 69 |
randomEncounters = []; |
| 70 |
|
| 71 |
if (scenarios.length > 0 && modules.length > 0 && heroes.length > 0) { |
| 72 |
// Add 5 random scenario |
| 73 |
[1, 2, 3, 4, 5].forEach(() => { |
| 74 |
const [weightedScenarios, weightedModularSets, weightedHeroes] = getWeightedData( |
| 75 |
encounters, |
| 76 |
scenarios, |
| 77 |
modules, |
| 78 |
heroes, |
| 79 |
); |
| 80 |
|
| 81 |
const randomScenario = weightedRandom(scenarios, weightedScenarios); |
| 82 |
const randomModularSet = weightedRandom(modules, weightedModularSets); |
| 83 |
const randomHero = weightedRandom(heroes, weightedHeroes); |
| 84 |
|
| 85 |
const encounter = { |
| 86 |
scenario: randomScenario, |
| 87 |
heroes: [randomHero], |
| 88 |
modularSets: [randomModularSet], |
| 89 |
}; |
| 90 |
|
| 91 |
randomEncounters.push(encounter); |
| 92 |
}); |
| 93 |
} |
| 94 |
} |
| 95 |
|
| 96 |
async function add(event) { |
| 97 |
const { parentNode } = event.detail.parentNode; |
| 98 |
|
| 99 |
const isRandom = parentNode.classList.contains("random"); |
| 100 |
|
| 101 |
const scenarioElement = parentNode.children[0]; |
| 102 |
const modulesElement = parentNode.children[1]; |
| 103 |
const difficultyElement = parentNode.children[2]; |
| 104 |
const hero1Element = parentNode.children[3]; |
| 105 |
const hero2Element = parentNode.children[4]; |
| 106 |
const resultElement = parentNode.children[5]; |
| 107 |
|
| 108 |
const scenariosService = new ScenariosService(); |
| 109 |
const heroesService = new HeroesService(); |
| 110 |
const modularSetsService = new ModularSetsService(); |
| 111 |
|
| 112 |
const encounterHeroes = []; |
| 113 |
|
| 114 |
const scenarioValue = isRandom ? scenarioElement.children[0].value : scenarioElement.innerHTML; |
| 115 |
|
| 116 |
const scenario = await scenariosService.find(scenarioValue); |
| 117 |
const hero1 = await heroesService.find(hero1Element.children[0].value); |
| 118 |
encounterHeroes.push(hero1); |
| 119 |
|
| 120 |
if (hero2Element.children[0].value !== "") { |
| 121 |
const hero2 = await heroesService.find(hero2Element.children[0].value); |
| 122 |
encounterHeroes.push(hero2); |
| 123 |
} |
| 124 |
|
| 125 |
const difficulty = |
| 126 |
Object.values(DifficultyEnum).find((x) => x === difficultyElement.children[0].value) || |
| 127 |
DifficultyEnum.STANDARD; |
| 128 |
|
| 129 |
const result = |
| 130 |
Object.values(ResultEnum).find((x) => x === resultElement.children[0].value) || ResultEnum.FORFEIT; |
| 131 |
|
| 132 |
// Retrieve modular sets |
| 133 |
const encounterModularSetsValues = isRandom |
| 134 |
? Array.from(modulesElement.children[0].selectedOptions, (option) => option.value) |
| 135 |
: modulesElement.innerHTML.split(", "); |
| 136 |
|
| 137 |
const rawEncounterModularSets = await Promise.all( |
| 138 |
encounterModularSetsValues.map((modularSet) => modularSetsService.find(modularSet)), |
| 139 |
); |
| 140 |
const encounterModules: ModularSet[] = rawEncounterModularSets.filter(notEmpty); |
| 141 |
|
| 142 |
const encounter = { |
| 143 |
id: null, |
| 144 |
scenario, |
| 145 |
heroes: encounterHeroes, |
| 146 |
modularSets: encounterModules, |
| 147 |
difficulty, |
| 148 |
result, |
| 149 |
}; |
| 150 |
|
| 151 |
// console.log(encounter); |
| 152 |
|
| 153 |
const encountersService = new EncountersService(); |
| 154 |
encountersService.save(encounter).then(() => window.location.reload()); |
| 155 |
} |
| 156 |
</script> |
| 157 |
|
| 158 |
<Title title="Suggested encounters" /> |
| 159 |
|
| 160 |
<table> |
| 161 |
<thead> |
| 162 |
<tr> |
| 163 |
<th>Scenario</th> |
| 164 |
<th>Modular Sets</th> |
| 165 |
<th>Difficulty</th> |
| 166 |
<th>Hero 1</th> |
| 167 |
<th>Hero 2</th> |
| 168 |
<th>Result</th> |
| 169 |
<th></th> |
| 170 |
</tr> |
| 171 |
</thead> |
| 172 |
<tbody> |
| 173 |
<!-- Add 5 random encounters --> |
| 174 |
{#each randomEncounters as encounter} |
| 175 |
<tr class="random"> |
| 176 |
<td> |
| 177 |
<Select |
| 178 |
defaultValue="{encounter.scenario.name}" |
| 179 |
source="{scenarios.map((scenario) => scenario.name)}" |
| 180 |
/> |
| 181 |
</td> |
| 182 |
<td> |
| 183 |
<Select |
| 184 |
defaultValue="{encounter.modularSets[0].name}" |
| 185 |
source="{modules.map((module) => module.name)}" |
| 186 |
multiple="{true}" |
| 187 |
/> |
| 188 |
</td> |
| 189 |
<td> |
| 190 |
<Select defaultValue="{DifficultyEnum.STANDARD}" source="{Object.values(DifficultyEnum)}" /> |
| 191 |
</td> |
| 192 |
<td> |
| 193 |
<Select |
| 194 |
defaultValue="{encounter.heroes[0].name}" |
| 195 |
source="{excludeHeroes(heroes, encounter.scenario.name, scenariosWinEncounters).map( |
| 196 |
(hero) => hero.name, |
| 197 |
)}" |
| 198 |
/> |
| 199 |
</td> |
| 200 |
<td> |
| 201 |
<Select |
| 202 |
source="{excludeHeroes(heroes, encounter.scenario.name, scenariosWinEncounters).map( |
| 203 |
(hero) => hero.name, |
| 204 |
)}" |
| 205 |
/> |
| 206 |
</td> |
| 207 |
<td> |
| 208 |
<Select source="{Object.values(ResultEnum)}" /> |
| 209 |
</td> |
| 210 |
<td> |
| 211 |
<Button label="Add" on:buttonClicked="{add}" /> |
| 212 |
</td> |
| 213 |
</tr> |
| 214 |
{/each} |
| 215 |
</tbody> |
| 216 |
</table> |
| 217 |
|
|
|
|
/apps/mc/src/lib/section.svelte
|
0 problems
|
|
|
/apps/mc/src/lib/select.svelte
|
0 problems
|
|
|
/apps/mc/src/lib/stats-table.svelte
|
0 problems
|
|
|
/apps/mc/src/lib/stats.svelte
|
0 problems
|
|
|
/apps/mc/src/lib/subtitle.svelte
|
0 problems
|
|
|
/apps/mc/src/lib/suggested.svelte
|
2 problems (0 errors, 2 warnings)
|
| Severity |
Rule |
| Warning |
Row 173, Column 9: "Unexpected console statement."
no-console
|
| Warning |
Row 179, Column 31: "Unexpected console statement."
no-console
|
| Line |
Source |
| 1 |
<svelte:options tag="mc-suggested" /> |
| 2 |
|
| 3 |
<script lang="ts"> |
| 4 |
import { random } from "@jga/algorithms"; |
| 5 |
|
| 6 |
import type { Encounter, Hero, ModularSet, Scenario } from "$models"; |
| 7 |
import { DifficultyEnum, ResultEnum } from "$models"; |
| 8 |
|
| 9 |
import { EncountersService, HeroesService, ModularSetsService, ScenariosService } from "$services"; |
| 10 |
|
| 11 |
import { excludeHeroes, notEmpty } from "./functions"; |
| 12 |
|
| 13 |
import Button from "$ui/button/src/button.svelte"; |
| 14 |
import Select from "$lib/select.svelte"; |
| 15 |
import Title from "$lib/title.svelte"; |
| 16 |
|
| 17 |
// eslint-disable-next-line import/no-mutable-exports |
| 18 |
export let heroes: Hero[] = []; |
| 19 |
// eslint-disable-next-line import/no-mutable-exports |
| 20 |
export let encounters: Encounter[] = []; |
| 21 |
// eslint-disable-next-line import/no-mutable-exports |
| 22 |
export let scenarios: Scenario[] = []; |
| 23 |
|
| 24 |
let gamesScenarios: Map<string, number>; |
| 25 |
let unorderedScenarios: Map<string, number>; |
| 26 |
let orderedScenarios: Map<string, number>; |
| 27 |
|
| 28 |
let scenariosWinEncounters: Map<string, Hero[]>; |
| 29 |
let progressionsEncounters: Map<Scenario, Partial<Encounter>[]>; |
| 30 |
let suggestedEncounters: Partial<Encounter>[]; |
| 31 |
|
| 32 |
$: { |
| 33 |
// order scenarios by play count |
| 34 |
// eslint-disable-next-line prefer-const |
| 35 |
gamesScenarios = encounters |
| 36 |
.map((encounter) => encounter.scenario.name) |
| 37 |
.reduce((acc, e) => acc.set(e, (acc.get(e) || 0) + 1), new Map()); |
| 38 |
|
| 39 |
// eslint-disable-next-line prefer-const |
| 40 |
unorderedScenarios = scenarios.reduce((acc, e) => { |
| 41 |
acc.set(e, (acc.get(e) || 0) + (gamesScenarios.get(e.name) || 0)); |
| 42 |
|
| 43 |
return acc; |
| 44 |
}, new Map()); |
| 45 |
|
| 46 |
// eslint-disable-next-line prefer-const |
| 47 |
orderedScenarios = new Map(Array.from(unorderedScenarios.entries()).sort((a, b) => a[1] - b[1])); |
| 48 |
|
| 49 |
// eslint-disable-next-line prefer-const |
| 50 |
scenariosWinEncounters = encounters |
| 51 |
.filter((encounter) => encounter.result === ResultEnum.WON) |
| 52 |
.reduce((acc, e) => { |
| 53 |
if (!acc.has(e.scenario.name)) { |
| 54 |
acc.set(e.scenario.name, []); |
| 55 |
} |
| 56 |
|
| 57 |
const newHeroes = acc.get(e.scenario.name); |
| 58 |
[e] |
| 59 |
.flatMap((encounter) => encounter.heroes) |
| 60 |
.filter((hero) => hero != null) |
| 61 |
.map((hero) => hero.name) |
| 62 |
.filter((hero, i, array) => array.indexOf(hero) === i) |
| 63 |
.forEach((hero) => newHeroes.push(hero)); |
| 64 |
|
| 65 |
acc.set(e.scenario.name, newHeroes.sort()); |
| 66 |
|
| 67 |
return acc; |
| 68 |
}, new Map()); |
| 69 |
|
| 70 |
// eslint-disable-next-line prefer-const |
| 71 |
progressionsEncounters = new Map(); |
| 72 |
Array.from(orderedScenarios.keys()).forEach((scenario) => { |
| 73 |
heroes.forEach((hero) => { |
| 74 |
if ( |
| 75 |
!scenariosWinEncounters.has(scenario.name) || |
| 76 |
!scenariosWinEncounters.get(scenario.name).includes(hero.name) |
| 77 |
) { |
| 78 |
if (!progressionsEncounters.has(scenario)) { |
| 79 |
progressionsEncounters.set(scenario, []); |
| 80 |
} |
| 81 |
|
| 82 |
const tryHeroes = progressionsEncounters.get(scenario) as Partial<Encounter>[]; |
| 83 |
tryHeroes.push({ |
| 84 |
scenario, |
| 85 |
modularSets: scenario.modularSets, |
| 86 |
difficulty: DifficultyEnum.STANDARD, |
| 87 |
heroes: [hero], |
| 88 |
}); |
| 89 |
|
| 90 |
progressionsEncounters.set(scenario, tryHeroes); |
| 91 |
} |
| 92 |
}); |
| 93 |
}); |
| 94 |
|
| 95 |
// eslint-disable-next-line prefer-const |
| 96 |
suggestedEncounters = []; |
| 97 |
// Pick a random one for each progression scenario |
| 98 |
progressionsEncounters.forEach((scenario) => { |
| 99 |
const scenarioEncounters = Array.from(scenario); |
| 100 |
const scenarioEncounter = scenarioEncounters[random(0, scenarioEncounters.length - 1)]; |
| 101 |
|
| 102 |
suggestedEncounters.push(scenarioEncounter); |
| 103 |
}); |
| 104 |
} |
| 105 |
|
| 106 |
async function add(event) { |
| 107 |
const { parentNode } = event.detail.parentNode; |
| 108 |
|
| 109 |
const isRandom = parentNode.classList.contains("random"); |
| 110 |
|
| 111 |
const scenarioElement = parentNode.children[0]; |
| 112 |
const modulesElement = parentNode.children[1]; |
| 113 |
const difficultyElement = parentNode.children[2]; |
| 114 |
const hero1Element = parentNode.children[3]; |
| 115 |
const hero2Element = parentNode.children[4]; |
| 116 |
// const hero3Element = parentNode.children[5]; |
| 117 |
// const hero4Element = parentNode.children[6]; |
| 118 |
const resultElement = parentNode.children[5]; |
| 119 |
|
| 120 |
const scenariosService = new ScenariosService(); |
| 121 |
const heroesService = new HeroesService(); |
| 122 |
const modularSetsService = new ModularSetsService(); |
| 123 |
|
| 124 |
const encounterHeroes = []; |
| 125 |
|
| 126 |
const scenarioValue = isRandom ? scenarioElement.children[0].value : scenarioElement.innerHTML; |
| 127 |
|
| 128 |
const scenario = await scenariosService.find(scenarioValue); |
| 129 |
const hero1 = await heroesService.find(hero1Element.children[0].value); |
| 130 |
encounterHeroes.push(hero1); |
| 131 |
|
| 132 |
if (hero2Element.children[0].value !== "") { |
| 133 |
const hero2 = await heroesService.find(hero2Element.children[0].value); |
| 134 |
encounterHeroes.push(hero2); |
| 135 |
} |
| 136 |
|
| 137 |
// if (hero3Element.children[0].value !== "") { |
| 138 |
// const hero3 = await heroesService.find(hero3Element.children[0].value); |
| 139 |
// encounterHeroes.push(hero3); |
| 140 |
// } |
| 141 |
// |
| 142 |
// if (hero4Element.children[0].value !== "") { |
| 143 |
// const hero4 = await heroesService.find(hero4Element.children[0].value); |
| 144 |
// encounterHeroes.push(hero4); |
| 145 |
// } |
| 146 |
|
| 147 |
const difficulty = |
| 148 |
Object.values(DifficultyEnum).find((x) => x === difficultyElement.children[0].value) || |
| 149 |
DifficultyEnum.STANDARD; |
| 150 |
|
| 151 |
const result = |
| 152 |
Object.values(ResultEnum).find((x) => x === resultElement.children[0].value) || ResultEnum.FORFEIT; |
| 153 |
|
| 154 |
// Retrieve modular sets |
| 155 |
const encounterModularSetsValues = isRandom |
| 156 |
? Array.from(modulesElement.children[0].selectedOptions, (option) => option.value) |
| 157 |
: modulesElement.innerHTML.split(", "); |
| 158 |
|
| 159 |
const rawEncounterModularSets = await Promise.all( |
| 160 |
encounterModularSetsValues.map((modularSet) => modularSetsService.find(modularSet)), |
| 161 |
); |
| 162 |
const encounterModules: ModularSet[] = rawEncounterModularSets.filter(notEmpty); |
| 163 |
|
| 164 |
const encounter = { |
| 165 |
id: null, |
| 166 |
scenario, |
| 167 |
heroes: encounterHeroes, |
| 168 |
modularSets: encounterModules, |
| 169 |
difficulty, |
| 170 |
result, |
| 171 |
}; |
| 172 |
|
| Warning |
Row 173, Column 9: "Unexpected console statement."
no-console
|
| 173 |
console.log(encounter); |
| 174 |
|
| 175 |
const encountersService = new EncountersService(); |
| 176 |
encountersService |
| 177 |
.save(encounter) |
| 178 |
.then(() => window.location.reload()) |
| Warning |
Row 179, Column 31: "Unexpected console statement."
no-console
|
| 179 |
.catch((error) => console.error(error)); |
| 180 |
} |
| 181 |
</script> |
| 182 |
|
| 183 |
<Title title="Suggested encounters" /> |
| 184 |
|
| 185 |
<table> |
| 186 |
<thead> |
| 187 |
<tr> |
| 188 |
<th>Scenario</th> |
| 189 |
<th>Modular Sets</th> |
| 190 |
<th>Difficulty</th> |
| 191 |
<th>Hero 1</th> |
| 192 |
<th>Hero 2</th> |
| 193 |
<th>Result</th> |
| 194 |
<th></th> |
| 195 |
</tr> |
| 196 |
</thead> |
| 197 |
<tbody> |
| 198 |
<!-- Add progression encounters --> |
| 199 |
{#each suggestedEncounters as encounter} |
| 200 |
<tr class="suggested"> |
| 201 |
<td>{encounter.scenario.name}</td> |
| 202 |
<td>{encounter.modularSets?.map((module) => module.name).join(", ") || ""}</td> |
| 203 |
<td> |
| 204 |
<Select defaultValue="{DifficultyEnum.STANDARD}" source="{Object.values(DifficultyEnum)}" /> |
| 205 |
</td> |
| 206 |
<td> |
| 207 |
<Select |
| 208 |
defaultValue="{encounter.heroes[0].name}" |
| 209 |
source="{excludeHeroes(heroes, encounter.scenario.name, scenariosWinEncounters).map( |
| 210 |
(hero) => hero.name, |
| 211 |
)}" |
| 212 |
/> |
| 213 |
</td> |
| 214 |
<td> |
| 215 |
<Select |
| 216 |
source="{excludeHeroes(heroes, encounter.scenario.name, scenariosWinEncounters).map( |
| 217 |
(hero) => hero.name, |
| 218 |
)}" |
| 219 |
/> |
| 220 |
</td> |
| 221 |
<td> |
| 222 |
<Select source="{Object.values(ResultEnum)}" /> |
| 223 |
</td> |
| 224 |
<td> |
| 225 |
<Button label="Add" on:buttonClicked="{add}" /> |
| 226 |
</td> |
| 227 |
</tr> |
| 228 |
{/each} |
| 229 |
</tbody> |
| 230 |
</table> |
| 231 |
|
|
|
|
/apps/mc/src/lib/title.svelte
|
0 problems
|
|
|
/apps/mc/src/lib/upcoming.svelte
|
0 problems
|
|
|
/apps/mc/src/routes/+layout.server.ts
|
0 problems
|
|
|
/apps/mc/src/routes/+layout.svelte
|
0 problems
|
|
|
/apps/mc/src/routes/+page.svelte
|
0 problems
|
|
|
/apps/mc/src/routes/data/+page.svelte
|
0 problems
|
|
|
/apps/mc/src/routes/encounters/+page.svelte
|
0 problems
|
|
|
/apps/mc/src/routes/progression/+page.svelte
|
0 problems
|
|
|
/apps/mc/src/routes/random/+page.svelte
|
0 problems
|
|
|
/apps/mc/src/routes/stats/+page.svelte
|
0 problems
|
|
|
/apps/mc/src/routes/upcoming/+page.svelte
|
0 problems
|
|
|
/apps/mc/src/services/encounters.ts
|
0 problems
|
|
|
/apps/mc/src/services/heroes.ts
|
0 problems
|
|
|
/apps/mc/src/services/index.ts
|
0 problems
|
|
|
/apps/mc/src/services/load.ts
|
0 problems
|
|
|
/apps/mc/src/services/modular-sets.ts
|
0 problems
|
|
|
/apps/mc/src/services/packs.ts
|
0 problems
|
|
|
/apps/mc/src/services/scenarios.ts
|
0 problems
|
|
|
/apps/mc/src/services/service.ts
|
0 problems
|
|
|
/apps/resume/src/app.d.ts
|
0 problems
|
|
|
/apps/resume/src/lib/contact.svelte
|
0 problems
|
|
|
/apps/resume/src/lib/education.svelte
|
0 problems
|
|
|
/apps/resume/src/lib/experience.svelte
|
0 problems
|
|
|
/apps/resume/src/lib/language.svelte
|
0 problems
|
|
|
/apps/resume/src/lib/profile.svelte
|
0 problems
|
|
|
/apps/resume/src/models/resume.ts
|
0 problems
|
|
|
/apps/resume/src/routes/+layout.ts
|
0 problems
|
|
|
/apps/resume/src/routes/+page.svelte
|
0 problems
|
|
|
/apps/roguelike/src/app.d.ts
|
0 problems
|
|
|
/apps/roguelike/src/lib/console.svelte
|
0 problems
|
|
|
/apps/roguelike/src/lib/game.svelte
|
0 problems
|
|
|
/apps/roguelike/src/lib/links.svelte
|
0 problems
|
|
|
/apps/roguelike/src/routes/+layout.ts
|
0 problems
|
|
|
/apps/roguelike/src/routes/+page.svelte
|
0 problems
|
|
|
/apps/roguelike/src/stores/index.ts
|
0 problems
|
|
|
/apps/roguelike/src/stores/messages.ts
|
0 problems
|
| Line |
Source |
| 1 |
<svelte:options tag="st-contracts" /> |
| 2 |
|
| 3 |
<script lang="ts"> |
| 4 |
import { onMount } from "svelte"; |
| 5 |
import Button from "$ui/button/src/button.svelte"; |
| 6 |
import Loader from "$ui/loader/src/loader.svelte"; |
| 7 |
import type { Contract } from "$models/contract"; |
| 8 |
|
| 9 |
let isLoading = true; |
| 10 |
let contracts: Contract[]; |
| 11 |
|
| 12 |
onMount(async () => { |
| 13 |
const options = { |
| 14 |
headers: { |
| 15 |
"Content-Type": "application/json", |
| 16 |
Authorization: `Bearer ${import.meta.env.VITE_API_TOKEN}`, |
| 17 |
}, |
| 18 |
}; |
| 19 |
|
| Error |
Row 20, Column 9: "fetch is not supported in op_mini all"
compat/compat
|
| 20 |
fetch(`${import.meta.env.VITE_API_URL}/my/contracts`, options) |
| 21 |
.then((response) => response.json()) |
| 22 |
.then((response) => { |
| 23 |
contracts = response.data.map((contract) => { |
| 24 |
return { |
| 25 |
id: contract.id, |
| 26 |
faction: { |
| 27 |
symbol: contract.factionSymbol, |
| 28 |
}, |
| 29 |
type: contract.type, |
| 30 |
terms: { |
| 31 |
deadline: new Date(contract.terms.deadline), |
| 32 |
payment: { |
| 33 |
onAccepted: contract.terms.payment.onAccepted, |
| 34 |
onFulfilled: contract.terms.payment.onFulfilled, |
| 35 |
}, |
| 36 |
deliver: contract.terms.deliver.map((deliver) => { |
| 37 |
return { |
| 38 |
trade: { symbol: deliver.tradeSymbol }, |
| 39 |
destination: { symbol: deliver.destinationSymbol }, |
| 40 |
unitsRequired: deliver.unitsRequired, |
| 41 |
unitsFulfilled: deliver.unitsFulfilled, |
| 42 |
}; |
| 43 |
}), |
| 44 |
}, |
| 45 |
accepted: contract.accepted, |
| 46 |
fulfilled: contract.fulfilled, |
| 47 |
expirationDate: new Date(contract.expiration), |
| 48 |
deadlineToAccept: new Date(contract.deadlineToAccept), |
| 49 |
}; |
| 50 |
}); |
| 51 |
|
| 52 |
isLoading = false; |
| 53 |
}) |
| 54 |
.catch((error) => { |
| Warning |
Row 55, Column 17: "Unexpected console statement."
no-console
|
| 55 |
console.error(error); |
| 56 |
isLoading = false; |
| 57 |
}); |
| 58 |
}); |
| 59 |
|
| 60 |
function accept(id: string) { |
| Warning |
Row 61, Column 9: "Unexpected console statement."
no-console
|
| 61 |
console.log(`accept contract ${id}`); |
| 62 |
|
| 63 |
const options = { |
| 64 |
method: "POST", |
| 65 |
headers: { |
| 66 |
"Content-Type": "application/json", |
| 67 |
Authorization: `Bearer ${import.meta.env.VITE_API_TOKEN}`, |
| 68 |
}, |
| 69 |
}; |
| 70 |
|
| Error |
Row 71, Column 9: "fetch is not supported in op_mini all"
compat/compat
|
| 71 |
fetch(`${import.meta.env.VITE_API_URL}/my/contracts/${id}/accept`, options) |
| 72 |
.then((response) => response.json()) |
| Warning |
Row 73, Column 20: "'response' is defined but never used."
@typescript-eslint/no-unused-vars
|
| 73 |
.then((response) => { |
| 74 |
window.location.reload(); |
| 75 |
}) |
| Warning |
Row 76, Column 31: "Unexpected console statement."
no-console
|
| 76 |
.catch((error) => console.error(error)); |
| 77 |
} |
| 78 |
</script> |
| 79 |
|
| 80 |
{#if isLoading} |
| 81 |
<Loader /> |
| 82 |
{:else} |
| 83 |
<h2>Contracts</h2> |
| 84 |
<table> |
| 85 |
<thead> |
| 86 |
<tr> |
| 87 |
<th>Contract</th> |
| 88 |
<th>Terms</th> |
| 89 |
<th>Accepted</th> |
| 90 |
<th>Fulfilled</th> |
| 91 |
<th>Expiration Date</th> |
| 92 |
<th>Deadline to Accept</th> |
| 93 |
<th>Action</th> |
| 94 |
</tr> |
| 95 |
</thead> |
| 96 |
<tbody> |
| 97 |
{#each contracts as contract} |
| 98 |
<tr> |
| 99 |
<td> |
| 100 |
<div> |
| 101 |
<span>{contract.faction.symbol}</span> |
| 102 |
<span>{contract.type}</span> |
| 103 |
</div> |
| 104 |
</td> |
| 105 |
<td> |
| 106 |
<div> |
| 107 |
<span>Payment</span> |
| 108 |
<span>{contract.terms.payment.onAccepted}</span> |
| 109 |
<span>{contract.terms.payment.onFulfilled}</span> |
| 110 |
</div> |
| 111 |
{#each contract.terms.deliver as deliver} |
| 112 |
<div> |
| 113 |
<span>Deliver</span> |
| 114 |
<span>{deliver.trade.symbol}</span> |
| 115 |
<span>{deliver.destination.symbol}</span> |
| 116 |
<span>{deliver.unitsRequired}</span> |
| 117 |
<span>{deliver.unitsFulfilled}</span> |
| 118 |
</div> |
| 119 |
{/each} |
| 120 |
</td> |
| 121 |
<td>{contract.accepted}</td> |
| 122 |
<td>{contract.fulfilled}</td> |
| 123 |
<td>{contract.expirationDate.toLocaleString()}</td> |
| 124 |
<td>{contract.deadlineToAccept.toLocaleString()}</td> |
| 125 |
<td> |
| 126 |
{#if contract.accepted === false} |
| Error |
Row 127, Column 71: "Remove this use of the output from "accept"; "accept" doesn't return anything."
sonarjs/no-use-of-empty-return-value
|
| 127 |
<Button label="accept" on:buttonClicked="{accept(contract.id)}" /> |
| 128 |
{/if} |
| 129 |
</td> |
| 130 |
</tr> |
| 131 |
{/each} |
| 132 |
</tbody> |
| 133 |
</table> |
| 134 |
{/if} |
| 135 |
|
|
| Severity |
Rule |
| Error |
Row 9, Column 12: "Exporting mutable 'let' binding, use 'const' instead."
import/no-mutable-exports
|
| Error |
Row 21, Column 9: "fetch is not supported in op_mini all"
compat/compat
|
| Warning |
Row 45, Column 17: "Unexpected console statement."
no-console
|
| Line |
Source |
| 1 |
<svelte:options tag="st-location" /> |
| 2 |
|
| 3 |
<script lang="ts"> |
| 4 |
import { onMount } from "svelte"; |
| 5 |
import type { Waypoint } from "$models/waypoint"; |
| 6 |
|
| 7 |
import Loader from "$ui/loader/src/loader.svelte"; |
| 8 |
|
| Error |
Row 9, Column 12: "Exporting mutable 'let' binding, use 'const' instead."
import/no-mutable-exports
|
| 9 |
export let waypoint: Partial<Waypoint>; |
| 10 |
|
| 11 |
let isLoading = true; |
| 12 |
|
| 13 |
onMount(async () => { |
| 14 |
const options = { |
| 15 |
headers: { |
| 16 |
"Content-Type": "application/json", |
| 17 |
Authorization: `Bearer ${import.meta.env.VITE_API_TOKEN}`, |
| 18 |
}, |
| 19 |
}; |
| 20 |
|
| Error |
Row 21, Column 9: "fetch is not supported in op_mini all"
compat/compat
|
| 21 |
fetch( |
| 22 |
`${import.meta.env.VITE_API_URL}/systems/${waypoint.system}/waypoints/${waypoint.system}-${ |
| 23 |
waypoint.symbol |
| 24 |
}`, |
| 25 |
options, |
| 26 |
) |
| 27 |
.then((response) => response.json()) |
| 28 |
.then((response) => { |
| 29 |
waypoint.faction = response.data.faction; |
| 30 |
waypoint.type = response.data.type; |
| 31 |
waypoint.coordinates = { |
| 32 |
x: response.data.x, |
| 33 |
y: response.data.y, |
| 34 |
}; |
| 35 |
waypoint.orbitals = response.data.orbitals.map((orbital) => { |
| 36 |
return { |
| 37 |
symbol: orbital.symbol, |
| 38 |
}; |
| 39 |
}); |
| 40 |
waypoint.traits = response.data.traits; |
| 41 |
|
| 42 |
isLoading = false; |
| 43 |
}) |
| 44 |
.catch((error) => { |
| Warning |
Row 45, Column 17: "Unexpected console statement."
no-console
|
| 45 |
console.error(error); |
| 46 |
isLoading = false; |
| 47 |
}); |
| 48 |
}); |
| 49 |
</script> |
| 50 |
|
| 51 |
{#if isLoading} |
| 52 |
<Loader /> |
| 53 |
{:else} |
| 54 |
<h2>Current location</h2> |
| 55 |
<div> |
| 56 |
System: {waypoint.system} <br /> |
| 57 |
Waypoint: {waypoint.symbol} <br /> |
| 58 |
Faction: {waypoint.faction.symbol} <br /> |
| 59 |
Type: {waypoint.type} <br /> |
| 60 |
Coordinates: {waypoint.coordinates.x}, {waypoint.coordinates.y} <br /> |
| 61 |
Orbitals: |
| 62 |
<ul> |
| 63 |
{#each waypoint.orbitals as orbital} |
| 64 |
<li>{orbital.symbol}</li> |
| 65 |
{/each} |
| 66 |
</ul> |
| 67 |
Traits: |
| 68 |
<ul> |
| 69 |
{#each waypoint.traits as trait} |
| 70 |
<li>{trait.name}</li> |
| 71 |
<p>{trait.description}</p> |
| 72 |
{/each} |
| 73 |
</ul> |
| 74 |
</div> |
| 75 |
{/if} |
| 76 |
|
|
| Line |
Source |
| 1 |
<svelte:options tag="st-summary" /> |
| 2 |
|
| 3 |
<script lang="ts"> |
| 4 |
import type { Agent } from "$models/agent"; |
| 5 |
|
| Error |
Row 6, Column 12: "Exporting mutable 'let' binding, use 'const' instead."
import/no-mutable-exports
|
| 6 |
export let agent: Agent; |
| 7 |
</script> |
| 8 |
|
| 9 |
<h2>Agent</h2> |
| 10 |
<div> |
| 11 |
Agent: {agent.symbol}<br /> |
| 12 |
Headquartes: {agent.headquarters}<br /> |
| 13 |
Credits: {agent.credits}<br /> |
| 14 |
Starting Faction: {agent.startingFaction.symbol}<br /> |
| 15 |
</div> |
| 16 |
|
|
| Severity |
Rule |
| Error |
Row 10, Column 12: "Exporting mutable 'let' binding, use 'const' instead."
import/no-mutable-exports
|
| Error |
Row 18, Column 33: "Define a constant instead of duplicating this literal 3 times."
sonarjs/no-duplicate-string
|
| Error |
Row 23, Column 30: "fetch is not supported in op_mini all"
compat/compat
|
| Warning |
Row 25, Column 23: "'errors' is assigned a value but never used."
@typescript-eslint/no-unused-vars
|
| Error |
Row 28, Column 29: "'waypoint' is already declared in the upper scope on line 10 column 16."
@typescript-eslint/no-shadow
|
| Error |
Row 29, Column 35: "'isShipyard' was used before it was defined."
@typescript-eslint/no-use-before-define
|
| Error |
Row 30, Column 29: "'availableShips' was used before it was defined."
@typescript-eslint/no-use-before-define
|
| Error |
Row 31, Column 1: "Expected indentation of 24 spaces but found 26."
indent
|
| Error |
Row 32, Column 1: "Expected indentation of 24 spaces but found 26."
indent
|
| Error |
Row 33, Column 1: "Expected indentation of 20 spaces but found 22."
indent
|
| Error |
Row 59, Column 35: "'waypoint' is already declared in the upper scope on line 10 column 16."
@typescript-eslint/no-shadow
|
| Warning |
Row 60, Column 13: "'ships' is assigned a value but never used."
@typescript-eslint/no-unused-vars
|
| Error |
Row 60, Column 13: "'ships' is never reassigned. Use 'const' instead."
prefer-const
|
| Error |
Row 69, Column 30: "fetch is not supported in op_mini all"
compat/compat
|
| Warning |
Row 74, Column 23: "'errors' is assigned a value but never used."
@typescript-eslint/no-unused-vars
|
| Error |
Row 79, Column 25: "'waypoint' is already declared in the upper scope on line 10 column 16."
@typescript-eslint/no-shadow
|
| Error |
Row 83, Column 27: "'waypoint' is already declared in the upper scope on line 10 column 16."
@typescript-eslint/no-shadow
|
| Warning |
Row 84, Column 9: "Unexpected console statement."
no-console
|
| Error |
Row 98, Column 9: "fetch is not supported in op_mini all"
compat/compat
|
| Warning |
Row 101, Column 17: "Unexpected console statement."
no-console
|
| Warning |
Row 103, Column 31: "Unexpected console statement."
no-console
|
| Error |
Row 123, Column 39: "'waypoint' is already declared in the upper scope on line 10 column 16."
@typescript-eslint/no-shadow
|
| Error |
Row 143, Column 81: "Remove this use of the output from "purchaseShip"; "purchaseShip" doesn't return anything."
sonarjs/no-use-of-empty-return-value
|
| Line |
Source |
| 1 |
<svelte:options tag="st-system" /> |
| 2 |
|
| 3 |
<script lang="ts"> |
| 4 |
import { onMount } from "svelte"; |
| 5 |
import type { Waypoint } from "$models/waypoint"; |
| 6 |
|
| 7 |
import Loader from "$ui/loader/src/loader.svelte"; |
| 8 |
import Button from "$ui/button/src/button.svelte"; |
| 9 |
|
| Error |
Row 10, Column 12: "Exporting mutable 'let' binding, use 'const' instead."
import/no-mutable-exports
|
| 10 |
export let waypoint: Partial<Waypoint>; |
| 11 |
|
| 12 |
let systemWaypoints: Waypoint[] = []; |
| 13 |
let isLoading = true; |
| 14 |
|
| 15 |
onMount(async () => { |
| 16 |
const options = { |
| 17 |
headers: { |
| Error |
Row 18, Column 33: "Define a constant instead of duplicating this literal 3 times."
sonarjs/no-duplicate-string
|
| 18 |
"Content-Type": "application/json", |
| 19 |
Authorization: `Bearer ${import.meta.env.VITE_API_TOKEN}`, |
| 20 |
}, |
| 21 |
}; |
| 22 |
|
| Error |
Row 23, Column 30: "fetch is not supported in op_mini all"
compat/compat
|
| 23 |
const result = await fetch(`${import.meta.env.VITE_API_URL}/systems/${waypoint.system}/waypoints`, options); |
| 24 |
|
| Warning |
Row 25, Column 23: "'errors' is assigned a value but never used."
@typescript-eslint/no-unused-vars
|
| 25 |
const { data, errors } = await result.json(); |
| 26 |
|
| 27 |
systemWaypoints = await Promise.all( |
| Error |
Row 28, Column 29: "'waypoint' is already declared in the upper scope on line 10 column 16."
@typescript-eslint/no-shadow
|
| 28 |
data.map(async (waypoint: Waypoint) => { |
| Error |
Row 29, Column 35: "'isShipyard' was used before it was defined."
@typescript-eslint/no-use-before-define
|
| 29 |
const shioTypes = isShipyard({ traits: waypoint.traits }) |
| Error |
Row 30, Column 29: "'availableShips' was used before it was defined."
@typescript-eslint/no-use-before-define
|
| 30 |
? await availableShips({ |
| Error |
Row 31, Column 1: "Expected indentation of 24 spaces but found 26."
indent
|
| 31 |
symbol: waypoint.symbol, |
| Error |
Row 32, Column 1: "Expected indentation of 24 spaces but found 26."
indent
|
| 32 |
system: waypoint.systemSymbol, |
| Error |
Row 33, Column 1: "Expected indentation of 20 spaces but found 22."
indent
|
| 33 |
}) |
| 34 |
: []; |
| 35 |
|
| 36 |
return { |
| 37 |
symbol: waypoint.symbol, |
| 38 |
system: waypoint.systemSymbol, |
| 39 |
faction: waypoint.faction, |
| 40 |
type: waypoint.type, |
| 41 |
coordinates: { |
| 42 |
x: waypoint.x, |
| 43 |
y: waypoint.y, |
| 44 |
}, |
| 45 |
orbitals: waypoint.orbitals.map((orbital) => { |
| 46 |
return { |
| 47 |
symbol: orbital.symbol, |
| 48 |
}; |
| 49 |
}), |
| 50 |
traits: waypoint.traits, |
| 51 |
shipTypes: shioTypes, |
| 52 |
}; |
| 53 |
}), |
| 54 |
); |
| 55 |
|
| 56 |
isLoading = false; |
| 57 |
}); |
| 58 |
|
| Error |
Row 59, Column 35: "'waypoint' is already declared in the upper scope on line 10 column 16."
@typescript-eslint/no-shadow
|
| 59 |
async function availableShips(waypoint: Partial<Waypoint>) { |
| Warning |
Row 60, Column 13: "'ships' is assigned a value but never used."
@typescript-eslint/no-unused-vars
|
| Error |
Row 60, Column 13: "'ships' is never reassigned. Use 'const' instead."
prefer-const
|
| 60 |
let ships = []; |
| 61 |
|
| 62 |
const options = { |
| 63 |
headers: { |
| 64 |
"Content-Type": "application/json", |
| 65 |
Authorization: `Bearer ${import.meta.env.VITE_API_TOKEN}`, |
| 66 |
}, |
| 67 |
}; |
| 68 |
|
| Error |
Row 69, Column 30: "fetch is not supported in op_mini all"
compat/compat
|
| 69 |
const result = await fetch( |
| 70 |
`${import.meta.env.VITE_API_URL}/systems/${waypoint.system}/waypoints/${waypoint.symbol}/shipyard`, |
| 71 |
options, |
| 72 |
); |
| 73 |
|
| Warning |
Row 74, Column 23: "'errors' is assigned a value but never used."
@typescript-eslint/no-unused-vars
|
| 74 |
const { data, errors } = await result.json(); |
| 75 |
|
| 76 |
return data.shipTypes; |
| 77 |
} |
| 78 |
|
| Error |
Row 79, Column 25: "'waypoint' is already declared in the upper scope on line 10 column 16."
@typescript-eslint/no-shadow
|
| 79 |
function isShipyard(waypoint: Partial<Waypoint>) { |
| 80 |
return waypoint.traits.map((trait) => trait.name).includes("Shipyard"); |
| 81 |
} |
| 82 |
|
| Error |
Row 83, Column 27: "'waypoint' is already declared in the upper scope on line 10 column 16."
@typescript-eslint/no-shadow
|
| 83 |
function purchaseShip(waypoint: Partial<Waypoint>, type: string) { |
| Warning |
Row 84, Column 9: "Unexpected console statement."
no-console
|
| 84 |
console.log(`purchase ship ${type} at ${waypoint.symbol}`); |
| 85 |
|
| 86 |
const options = { |
| 87 |
method: "POST", |
| 88 |
headers: { |
| 89 |
"Content-Type": "application/json", |
| 90 |
Authorization: `Bearer ${import.meta.env.VITE_API_TOKEN}`, |
| 91 |
}, |
| 92 |
body: JSON.stringify({ |
| 93 |
shipType: type, |
| 94 |
waypointSymbol: waypoint.symbol, |
| 95 |
}), |
| 96 |
}; |
| 97 |
|
| Error |
Row 98, Column 9: "fetch is not supported in op_mini all"
compat/compat
|
| 98 |
fetch(`${import.meta.env.VITE_API_URL}/my/ships`, options) |
| 99 |
.then((response) => response.json()) |
| 100 |
.then((response) => { |
| Warning |
Row 101, Column 17: "Unexpected console statement."
no-console
|
| 101 |
console.log(response); |
| 102 |
}) |
| Warning |
Row 103, Column 31: "Unexpected console statement."
no-console
|
| 103 |
.catch((error) => console.error(error)); |
| 104 |
} |
| 105 |
</script> |
| 106 |
|
| 107 |
{#if isLoading} |
| 108 |
<Loader /> |
| 109 |
{:else} |
| 110 |
<h2>System</h2> |
| 111 |
<table> |
| 112 |
<thead> |
| 113 |
<tr> |
| 114 |
<th>Symbol</th> |
| 115 |
<th>Faction</th> |
| 116 |
<th>Type</th> |
| 117 |
<th>Coordinates</th> |
| 118 |
<th>Traits</th> |
| 119 |
<th>Available ships</th> |
| 120 |
</tr> |
| 121 |
</thead> |
| 122 |
<tbody> |
| Error |
Row 123, Column 39: "'waypoint' is already declared in the upper scope on line 10 column 16."
@typescript-eslint/no-shadow
|
| 123 |
{#each systemWaypoints as waypoint} |
| 124 |
<tr> |
| 125 |
<td>{waypoint.symbol}</td> |
| 126 |
<td>{waypoint.faction.symbol}</td> |
| 127 |
<td>{waypoint.type}</td> |
| 128 |
<td>{waypoint.coordinates.x}, {waypoint.coordinates.y}</td> |
| 129 |
<td> |
| 130 |
<ul> |
| 131 |
{#each waypoint.traits as trait} |
| 132 |
<li>{trait.name}</li> |
| 133 |
{/each} |
| 134 |
</ul> |
| 135 |
</td> |
| 136 |
<td> |
| 137 |
{#if waypoint.shipTypes.length > 0} |
| 138 |
<ul> |
| 139 |
{#each waypoint.shipTypes as ship} |
| 140 |
<li> |
| 141 |
{ship.type} |
| 142 |
</li> |
| Error |
Row 143, Column 81: "Remove this use of the output from "purchaseShip"; "purchaseShip" doesn't return anything."
sonarjs/no-use-of-empty-return-value
|
| 143 |
<Button label="purchase" on:buttonClicked="{purchaseShip(waypoint, ship.type)}" /> |
| 144 |
{/each} |
| 145 |
</ul> |
| 146 |
{:else} |
| 147 |
No ships available |
| 148 |
{/if} |
| 149 |
</td> |
| 150 |
</tr> |
| 151 |
{/each} |
| 152 |
</tbody> |
| 153 |
</table> |
| 154 |
{/if} |
| 155 |
|
|
| Severity |
Rule |
| Error |
Row 21, Column 9: "fetch is not supported in op_mini all"
compat/compat
|
| Warning |
Row 37, Column 17: "Unexpected console statement."
no-console
|
| Line |
Source |
| 1 |
<svelte:options tag="st-routes" /> |
| 2 |
|
| 3 |
<script lang="ts"> |
| 4 |
import { onMount } from "svelte"; |
| 5 |
import Summary from "$components/summary.svelte"; |
| 6 |
|
| 7 |
import type { Agent } from "$models/agent"; |
| 8 |
import Loader from "$ui/loader/src/loader.svelte"; |
| 9 |
|
| 10 |
let isLoading = true; |
| 11 |
let agent: Agent; |
| 12 |
|
| 13 |
onMount(async () => { |
| 14 |
const options = { |
| 15 |
headers: { |
| 16 |
"Content-Type": "application/json", |
| 17 |
Authorization: `Bearer ${import.meta.env.VITE_API_TOKEN}`, |
| 18 |
}, |
| 19 |
}; |
| 20 |
// retrieve agent data |
| Error |
Row 21, Column 9: "fetch is not supported in op_mini all"
compat/compat
|
| 21 |
fetch(`${import.meta.env.VITE_API_URL}/my/agent`, options) |
| 22 |
.then((response) => response.json()) |
| 23 |
.then((response) => { |
| 24 |
agent = { |
| 25 |
accountId: response.data.accountId, |
| 26 |
symbol: response.data.symbol, |
| 27 |
headquarters: response.data.headquarters, |
| 28 |
credits: response.data.credits, |
| 29 |
startingFaction: { |
| 30 |
symbol: response.data.startingFaction, |
| 31 |
}, |
| 32 |
}; |
| 33 |
|
| 34 |
isLoading = false; |
| 35 |
}) |
| 36 |
.catch((error) => { |
| Warning |
Row 37, Column 17: "Unexpected console statement."
no-console
|
| 37 |
console.error(error); |
| 38 |
isLoading = false; |
| 39 |
}); |
| 40 |
}); |
| 41 |
</script> |
| 42 |
|
| 43 |
<svelte:head> |
| 44 |
<title>Space Traders</title> |
| 45 |
<html lang="en-GB"></html> |
| 46 |
</svelte:head> |
| 47 |
|
| 48 |
{#if isLoading} |
| 49 |
<Loader /> |
| 50 |
{:else} |
| 51 |
<Summary agent="{agent}" /> |
| 52 |
{/if} |
| 53 |
|
|
| Line |
Source |
| 1 |
<svelte:options tag="st-routes-factions" /> |
| 2 |
|
| 3 |
<script lang="ts"> |
| 4 |
import { onMount } from "svelte"; |
| 5 |
|
| 6 |
import Loader from "$ui/loader/src/loader.svelte"; |
| 7 |
import type { Faction } from "$models/faction"; |
| Warning |
Row 8, Column 12: "'System' is defined but never used."
@typescript-eslint/no-unused-vars
|
| 8 |
import System from "$components/system.svelte"; |
| 9 |
|
| 10 |
let isLoading = true; |
| 11 |
let factions: Faction[] = []; |
| 12 |
|
| 13 |
onMount(async () => { |
| 14 |
const options = { |
| 15 |
headers: { |
| 16 |
"Content-Type": "application/json", |
| 17 |
Authorization: `Bearer ${import.meta.env.VITE_API_TOKEN}`, |
| 18 |
}, |
| 19 |
}; |
| 20 |
|
| Error |
Row 21, Column 9: "fetch is not supported in op_mini all"
compat/compat
|
| 21 |
fetch(`${import.meta.env.VITE_API_URL}/factions`, options) |
| 22 |
.then((response) => response.json()) |
| 23 |
.then((response) => { |
| 24 |
factions = response.data.map((faction: Faction) => { |
| 25 |
return { |
| 26 |
symbol: faction.symbol, |
| 27 |
name: faction.name, |
| 28 |
description: faction.description, |
| 29 |
headquarters: faction.headquarters, |
| 30 |
traits: faction.traits, |
| 31 |
isRecruiting: faction.isRecruiting, |
| 32 |
}; |
| 33 |
}); |
| 34 |
isLoading = false; |
| 35 |
}); |
| 36 |
}); |
| 37 |
</script> |
| 38 |
|
| 39 |
{#if isLoading} |
| 40 |
<Loader /> |
| 41 |
{:else} |
| 42 |
<table> |
| 43 |
<thead> |
| 44 |
<tr> |
| 45 |
<th>Symbol</th> |
| 46 |
<th>Name</th> |
| 47 |
<th>Description</th> |
| 48 |
<th>Headquarters</th> |
| 49 |
<th>Traits</th> |
| 50 |
<th>Recruiting</th> |
| 51 |
</tr> |
| 52 |
</thead> |
| 53 |
<tbody> |
| 54 |
{#each factions as faction} |
| 55 |
<tr> |
| 56 |
<td>{faction.symbol}</td> |
| 57 |
<td>{faction.name}</td> |
| 58 |
<td>{faction.description}</td> |
| 59 |
<td>{faction.headquarters} </td> |
| 60 |
<td> |
| 61 |
<ul> |
| 62 |
{#each faction.traits as trait} |
| 63 |
<li>{trait.name}</li> |
| 64 |
{/each} |
| 65 |
</ul> |
| 66 |
</td> |
| 67 |
<td>{faction.isRecruiting}</td> |
| 68 |
</tr> |
| 69 |
{/each} |
| 70 |
</tbody> |
| 71 |
</table> |
| 72 |
{/if} |
| 73 |
|
|
| Severity |
Rule |
| Error |
Row 21, Column 9: "fetch is not supported in op_mini all"
compat/compat
|
| Error |
Row 28, Column 18: "'sector' is never reassigned. Use 'const' instead."
prefer-const
|
| Error |
Row 28, Column 26: "'system' is never reassigned. Use 'const' instead."
prefer-const
|
| Error |
Row 28, Column 34: "'waypoint' is never reassigned. Use 'const' instead."
prefer-const
|
| Line |
Source |
| 1 |
<svelte:options tag="st-routes-location" /> |
| 2 |
|
| 3 |
<script lang="ts"> |
| 4 |
import { onMount } from "svelte"; |
| 5 |
import Location from "$components/location.svelte"; |
| 6 |
|
| 7 |
import Loader from "$ui/loader/src/loader.svelte"; |
| 8 |
import type { Waypoint } from "$models/waypoint"; |
| 9 |
|
| 10 |
let isLoading = true; |
| 11 |
let currentLocation: Partial<Waypoint>; |
| 12 |
|
| 13 |
onMount(async () => { |
| 14 |
const options = { |
| 15 |
headers: { |
| 16 |
"Content-Type": "application/json", |
| 17 |
Authorization: `Bearer ${import.meta.env.VITE_API_TOKEN}`, |
| 18 |
}, |
| 19 |
}; |
| 20 |
|
| Error |
Row 21, Column 9: "fetch is not supported in op_mini all"
compat/compat
|
| 21 |
fetch(`${import.meta.env.VITE_API_URL}/my/agent`, options) |
| 22 |
.then((response) => response.json()) |
| 23 |
.then((response) => { |
| 24 |
let sector: string; |
| 25 |
let system: string; |
| 26 |
let waypoint: string; |
| 27 |
|
| Error |
Row 28, Column 18: "'sector' is never reassigned. Use 'const' instead."
prefer-const
|
| Error |
Row 28, Column 26: "'system' is never reassigned. Use 'const' instead."
prefer-const
|
| Error |
Row 28, Column 34: "'waypoint' is never reassigned. Use 'const' instead."
prefer-const
|
| 28 |
[sector, system, waypoint] = response.data.headquarters.split("-"); |
| 29 |
currentLocation = { |
| 30 |
symbol: waypoint, |
| 31 |
system: `${sector}-${system}`, |
| 32 |
}; |
| 33 |
isLoading = false; |
| 34 |
}); |
| 35 |
}); |
| 36 |
</script> |
| 37 |
|
| 38 |
{#if isLoading} |
| 39 |
<Loader /> |
| 40 |
{:else} |
| 41 |
<Location waypoint="{currentLocation}" /> |
| 42 |
{/if} |
| 43 |
|
|
| Severity |
Rule |
| Error |
Row 21, Column 9: "fetch is not supported in op_mini all"
compat/compat
|
| Warning |
Row 33, Column 17: "Unexpected console statement."
no-console
|
| Line |
Source |
| 1 |
<svelte:options tag="st-routes-status" /> |
| 2 |
|
| 3 |
<script lang="ts"> |
| 4 |
import { onMount } from "svelte"; |
| 5 |
|
| 6 |
import Loader from "$ui/loader/src/loader.svelte"; |
| 7 |
import type { Status } from "$models/status"; |
| 8 |
|
| 9 |
let status: Status; |
| 10 |
let isLoading = true; |
| 11 |
|
| 12 |
onMount(() => { |
| 13 |
const options = { |
| 14 |
headers: { |
| 15 |
"Content-Type": "application/json", |
| 16 |
Authorization: `Bearer ${import.meta.env.VITE_API_TOKEN}`, |
| 17 |
}, |
| 18 |
}; |
| 19 |
|
| 20 |
// retrieve server status |
| Error |
Row 21, Column 9: "fetch is not supported in op_mini all"
compat/compat
|
| 21 |
fetch(`${import.meta.env.VITE_API_URL}`, options) |
| 22 |
.then((response) => response.json()) |
| 23 |
.then((response) => { |
| 24 |
status = { |
| 25 |
status: response.status, |
| 26 |
version: response.version, |
| 27 |
resetDate: new Date(response.resetDate), |
| 28 |
announcements: response.announcements, |
| 29 |
}; |
| 30 |
isLoading = false; |
| 31 |
}) |
| 32 |
.catch((error) => { |
| Warning |
Row 33, Column 17: "Unexpected console statement."
no-console
|
| 33 |
console.error(error); |
| 34 |
}); |
| 35 |
}); |
| 36 |
</script> |
| 37 |
|
| 38 |
{#if isLoading} |
| 39 |
<Loader /> |
| 40 |
{:else} |
| 41 |
Status: {status.status} <br /> |
| 42 |
Version: {status.version} <br /> |
| 43 |
Reset Date: {status.resetDate.toLocaleString()} <br /> |
| 44 |
Announcements: <br /> |
| 45 |
{#each status.announcements as announcement} |
| 46 |
<strong>{announcement.title}</strong> - {announcement.body} <br /> |
| 47 |
{/each} |
| 48 |
{/if} |
| 49 |
|
|
| Severity |
Rule |
| Error |
Row 21, Column 9: "fetch is not supported in op_mini all"
compat/compat
|
| Error |
Row 28, Column 18: "'sector' is never reassigned. Use 'const' instead."
prefer-const
|
| Error |
Row 28, Column 26: "'system' is never reassigned. Use 'const' instead."
prefer-const
|
| Error |
Row 28, Column 34: "'waypoint' is never reassigned. Use 'const' instead."
prefer-const
|
| Line |
Source |
| 1 |
<svelte:options tag="st-routes-system" /> |
| 2 |
|
| 3 |
<script lang="ts"> |
| 4 |
import { onMount } from "svelte"; |
| 5 |
import System from "$components/system.svelte"; |
| 6 |
|
| 7 |
import Loader from "$ui/loader/src/loader.svelte"; |
| 8 |
import type { Waypoint } from "$models/waypoint"; |
| 9 |
|
| 10 |
let isLoading = true; |
| 11 |
let currentLocation: Partial<Waypoint>; |
| 12 |
|
| 13 |
onMount(async () => { |
| 14 |
const options = { |
| 15 |
headers: { |
| 16 |
"Content-Type": "application/json", |
| 17 |
Authorization: `Bearer ${import.meta.env.VITE_API_TOKEN}`, |
| 18 |
}, |
| 19 |
}; |
| 20 |
|
| Error |
Row 21, Column 9: "fetch is not supported in op_mini all"
compat/compat
|
| 21 |
fetch(`${import.meta.env.VITE_API_URL}/my/agent`, options) |
| 22 |
.then((response) => response.json()) |
| 23 |
.then((response) => { |
| 24 |
let sector: string; |
| 25 |
let system: string; |
| 26 |
let waypoint: string; |
| 27 |
|
| Error |
Row 28, Column 18: "'sector' is never reassigned. Use 'const' instead."
prefer-const
|
| Error |
Row 28, Column 26: "'system' is never reassigned. Use 'const' instead."
prefer-const
|
| Error |
Row 28, Column 34: "'waypoint' is never reassigned. Use 'const' instead."
prefer-const
|
| 28 |
[sector, system, waypoint] = response.data.headquarters.split("-"); |
| 29 |
currentLocation = { |
| 30 |
symbol: waypoint, |
| 31 |
system: `${sector}-${system}`, |
| 32 |
}; |
| 33 |
isLoading = false; |
| 34 |
}); |
| 35 |
}); |
| 36 |
</script> |
| 37 |
|
| 38 |
{#if isLoading} |
| 39 |
<Loader /> |
| 40 |
{:else} |
| 41 |
<System waypoint="{currentLocation}" /> |
| 42 |
{/if} |
| 43 |
|
|
|
|
/apps/storybook/stories/Art/Pixel.stories.ts
|
0 problems
|
|
|
/apps/storybook/stories/Base/Buttons.stories.ts
|
0 problems
|
|
|
/apps/storybook/stories/Base/Shapes.stories.ts
|
0 problems
|
|
|
/apps/storybook/stories/Components/Collapse.stories.ts
|
0 problems
|
|
|
/apps/storybook/stories/Components/Data.stories.ts
|
0 problems
|
|
|
/apps/storybook/stories/Components/Leaderboard.stories.ts
|
0 problems
|
|
|
/apps/storybook/stories/Components/PlaceholderLoader.stories.ts
|
0 problems
|
|
|
/apps/storybook/stories/Components/Progress.stories.ts
|
0 problems
|
|
|
/apps/storybook/stories/Components/Table.stories.ts
|
0 problems
|
|
|
/apps/storybook/stories/Components/Tabs.stories.ts
|
0 problems
|
|
|
/libs/algorithms/src/coalesce.ts
|
0 problems
|
|
|
/libs/algorithms/src/index.ts
|
0 problems
|
|
|
/libs/algorithms/src/random.ts
|
0 problems
|
|
|
/libs/algorithms/src/shuffle.ts
|
0 problems
|
|
|
/libs/algorithms/src/sort.ts
|
0 problems
|
|
|
/libs/algorithms/tests/coalesce.spec.ts
|
0 problems
|
|
|
/libs/algorithms/tests/random.spec.ts
|
0 problems
|
|
|
/libs/algorithms/tests/shuffle.spec.ts
|
0 problems
|
|
|
/libs/algorithms/tests/sort.spec.ts
|
0 problems
|
|
|
/libs/algorithms/tests/weighted-random.spec.ts
|
0 problems
|
|
|
/libs/apis/src/index.ts
|
0 problems
|
|
|
/libs/apis/src/response.ts
|
0 problems
|
|
|
/libs/apis/tests/response.spec.ts
|
0 problems
|
|
|
/libs/arrays/src/average.ts
|
0 problems
|
|
|
/libs/arrays/src/count.ts
|
0 problems
|
|
|
/libs/arrays/src/getby.ts
|
0 problems
|
|
|
/libs/arrays/src/index.ts
|
0 problems
|
|
|
/libs/arrays/src/isempty.ts
|
0 problems
|
|
|
/libs/arrays/src/unique.ts
|
0 problems
|
|
|
/libs/arrays/tests/average.spec.ts
|
0 problems
|
|
|
/libs/arrays/tests/count.spec.ts
|
0 problems
|
|
|
/libs/arrays/tests/getby.spec.ts
|
0 problems
|
|
|
/libs/arrays/tests/isempty.spec.ts
|
0 problems
|
|
|
/libs/arrays/tests/unique.spec.ts
|
0 problems
|
|
|
/libs/converters/tests/array-to-csv.spec.ts
|
0 problems
|
|
|
/libs/converters/tests/celsiustofahrenheit.spec.ts
|
0 problems
|
|
|
/libs/converters/tests/csv-to-json.spec.ts
|
0 problems
|
|
|
/libs/converters/tests/fahrenheit-to-celsius.spec.ts
|
0 problems
|
|
|
/libs/converters/tests/json-to-csv.spec.ts
|
0 problems
|
|
|
/libs/converters/tests/mapfromobject.spec.ts
|
0 problems
|
|
|
/libs/data/src/index.ts
|
0 problems
|
|
|
/libs/data/src/queue.ts
|
0 problems
|
|
|
/libs/data/src/stack.ts
|
0 problems
|
|
|
/libs/data/tests/queue.spec.ts
|
0 problems
|
|
|
/libs/data/tests/stack.spec.ts
|
0 problems
|
|
|
/libs/dates/src/add.ts
|
0 problems
|
|
|
/libs/dates/src/current-time.ts
|
0 problems
|
|
|
/libs/dates/src/diff.ts
|
0 problems
|
|
|
/libs/dates/src/index.ts
|
0 problems
|
|
|
/libs/dates/src/substract.ts
|
0 problems
|
|
|
/libs/dates/tests/add.spec.ts
|
0 problems
|
|
|
/libs/dates/tests/currenttime.spec.ts
|
0 problems
|
|
|
/libs/dates/tests/diff.spec.ts
|
0 problems
|
|
|
/libs/dates/tests/substract.spec.ts
|
0 problems
|
|
|
/libs/games/src/colors/colors.ts
|
0 problems
|
|
|
/libs/games/src/colors/hsbToRgb.ts
|
0 problems
|
|
|
/libs/games/src/colors/index.ts
|
0 problems
|
|
|
/libs/games/src/colors/random.ts
|
0 problems
|
|
|
/libs/games/src/colors/rgbToHex.ts
|
0 problems
|
|
|
/libs/games/src/commands/index.ts
|
0 problems
|
|
|
/libs/games/src/commands/keys.ts
|
0 problems
|
|
|
/libs/games/src/commands/move.ts
|
0 problems
|
|
|
/libs/games/src/commands/roll.ts
|
0 problems
|
|
|
/libs/games/src/console/console.ts
|
0 problems
|
|
|
/libs/games/src/console/index.ts
|
0 problems
|
|
|
/libs/games/src/console/interface.ts
|
0 problems
|
|
|
/libs/games/src/console/renderer.ts
|
0 problems
|
|
|
/libs/games/src/dices/dice6.ts
|
0 problems
|
|
|
/libs/games/src/dices/diceBase.ts
|
0 problems
|
|
|
/libs/games/src/dices/diceInterface.ts
|
0 problems
|
|
|
/libs/games/src/dices/index.ts
|
0 problems
|
|
|
/libs/games/src/display/display.ts
|
0 problems
|
|
|
/libs/games/src/display/index.ts
|
0 problems
|
|
|
/libs/games/src/engine/components/appearance.ts
|
0 problems
|
|
|
/libs/games/src/engine/components/attack.ts
|
0 problems
|
|
|
/libs/games/src/engine/components/damageable.ts
|
0 problems
|
|
|
/libs/games/src/engine/components/enum.ts
|
0 problems
|
|
|
/libs/games/src/engine/components/index.ts
|
0 problems
|
|
|
/libs/games/src/engine/components/moveable.ts
|
0 problems
|
|
|
/libs/games/src/engine/components/position.ts
|
0 problems
|
|
|
/libs/games/src/engine/components/spread.ts
|
0 problems
|
|
|
/libs/games/src/engine/entities/actor.ts
|
0 problems
|
|
|
/libs/games/src/engine/entities/entity.ts
|
0 problems
|
|
|
/libs/games/src/engine/entities/factory.ts
|
0 problems
|
|
|
/libs/games/src/engine/entities/index.ts
|
0 problems
|
|
|
/libs/games/src/engine/entities/player.ts
|
0 problems
|
|
|
/libs/games/src/engine/index.ts
|
0 problems
|
|
|
/libs/games/src/engine/loop.ts
|
0 problems
|
|
|
/libs/games/src/engine/scheduler.ts
|
0 problems
|
|
|
/libs/games/src/engine/systems/damage.ts
|
0 problems
|
|
|
/libs/games/src/engine/systems/draw.ts
|
0 problems
|
|
|
/libs/games/src/engine/systems/index.ts
|
0 problems
|
|
|
/libs/games/src/engine/systems/movement.ts
|
0 problems
|
|
|
/libs/games/src/engine/systems/position.ts
|
0 problems
|
|
|
/libs/games/src/engine/systems/spread.ts
|
0 problems
|
|
|
/libs/games/src/engine/systems/system.ts
|
0 problems
|
|
|
/libs/games/src/engine/world.ts
|
0 problems
|
|
|
/libs/games/src/glyphs/character.ts
|
0 problems
|
|
|
/libs/games/src/glyphs/floor.ts
|
0 problems
|
|
|
/libs/games/src/glyphs/glyph.ts
|
0 problems
|
|
|
/libs/games/src/glyphs/index.ts
|
0 problems
|
|
|
/libs/games/src/glyphs/wall.ts
|
0 problems
|
|
|
/libs/games/src/index.ts
|
0 problems
|
|
|
/libs/games/src/maps/enums.ts
|
0 problems
|
|
|
/libs/games/src/maps/generator-cellular.ts
|
0 problems
|
|
|
/libs/games/src/maps/index.ts
|
0 problems
|
|
|
/libs/games/src/maps/interfaces.ts
|
0 problems
|
|
|
/libs/games/src/maps/map.ts
|
0 problems
|
|
|
/libs/games/src/opend6/difficulty.ts
|
0 problems
|
|
|
/libs/games/src/opend6/index.ts
|
0 problems
|
|
|
/libs/games/src/opend6/roll.ts
|
0 problems
|
|
|
/libs/games/src/screens/index.ts
|
0 problems
|
|
|
/libs/games/src/screens/interface.ts
|
0 problems
|
|
|
/libs/games/src/screens/observer.ts
|
0 problems
|
|
|
/libs/games/src/screens/screen.ts
|
0 problems
|
|
|
/libs/games/src/tiles/factory.ts
|
0 problems
|
|
|
/libs/games/src/tiles/floor.ts
|
0 problems
|
|
|
/libs/games/src/tiles/index.ts
|
0 problems
|
|
|
/libs/games/src/tiles/null.ts
|
0 problems
|
|
|
/libs/games/src/tiles/tile.ts
|
0 problems
|
|
|
/libs/games/src/tiles/wall.ts
|
0 problems
|
|
|
/libs/games/tests/colors/color.spec.ts
|
0 problems
|
|
|
/libs/games/tests/colors/hsbToRgb.spec.ts
|
0 problems
|
|
|
/libs/games/tests/colors/random.spec.ts
|
0 problems
|
|
|
/libs/games/tests/colors/rgbToHex.spec.ts
|
0 problems
|
|
|
/libs/games/tests/commands/keys.spec.ts
|
0 problems
|
|
|
/libs/games/tests/commands/move.spec.ts
|
0 problems
|
|
|
/libs/games/tests/commands/roll.spec.ts
|
0 problems
|
|
|
/libs/games/tests/console/console.spec.ts
|
0 problems
|
|
|
/libs/games/tests/console/renderer.spec.ts
|
0 problems
|
|
|
/libs/games/tests/dices/dice.spec.ts
|
0 problems
|
|
|
/libs/games/tests/dices/dice6.spec.ts
|
0 problems
|
|
|
/libs/games/tests/display/display.spec.ts
|
0 problems
|
|
|
/libs/games/tests/engine/components/appearance.spec.ts
|
0 problems
|
|
|
/libs/games/tests/engine/components/attack.spec.ts
|
0 problems
|
|
|
/libs/games/tests/engine/components/damageable.spec.ts
|
0 problems
|
|
|
/libs/games/tests/engine/components/position.spec.ts
|
0 problems
|
|
|
/libs/games/tests/engine/components/spread.spec.ts
|
0 problems
|
|
|
/libs/games/tests/engine/entities/actor.spec.ts
|
0 problems
|
|
|
/libs/games/tests/engine/entities/entity.spec.ts
|
0 problems
|
|
|
/libs/games/tests/engine/entities/player.spec.ts
|
0 problems
|
|
|
/libs/games/tests/engine/loop.spec.ts
|
0 problems
|
|
|
/libs/games/tests/engine/scheduler.spec.ts
|
0 problems
|
|
|
/libs/games/tests/engine/systems/damage.spec.ts
|
0 problems
|
|
|
/libs/games/tests/engine/systems/draw.spec.ts
|
0 problems
|
|
|
/libs/games/tests/engine/systems/movement.spec.ts
|
0 problems
|
|
|
/libs/games/tests/engine/systems/position.spec.ts
|
0 problems
|
|
|
/libs/games/tests/engine/systems/spread.spec.ts
|
0 problems
|
|
|
/libs/games/tests/engine/world.spec.ts
|
0 problems
|
|
|
/libs/games/tests/glyphs/character.spec.ts
|
0 problems
|
|
|
/libs/games/tests/glyphs/floor.spec.ts
|
0 problems
|
|
|
/libs/games/tests/glyphs/glyph.spec.ts
|
0 problems
|
|
|
/libs/games/tests/glyphs/wall.spec.ts
|
0 problems
|
|
|
/libs/games/tests/maps/directions.spec.ts
|
0 problems
|
|
|
/libs/games/tests/maps/generator-cellular.spec.ts
|
0 problems
|
|
|
/libs/games/tests/maps/map.spec.ts
|
0 problems
|
|
|
/libs/games/tests/opend6/difficulty.spec.ts
|
0 problems
|
|
|
/libs/games/tests/opend6/roll.spec.ts
|
0 problems
|
|
|
/libs/games/tests/screens/observer.spec.ts
|
0 problems
|
|
|
/libs/games/tests/screens/screen.spec.ts
|
0 problems
|
|
|
/libs/games/tests/tiles/factory.spec.ts
|
0 problems
|
|
|
/libs/games/tests/tiles/floor.spec.ts
|
0 problems
|
|
|
/libs/games/tests/tiles/null.spec.ts
|
0 problems
|
|
|
/libs/games/tests/tiles/tile.spec.ts
|
0 problems
|
|
|
/libs/games/tests/tiles/wall.spec.ts
|
0 problems
|
|
|
/libs/generators/tests/boolean.spec.ts
|
0 problems
|
|
|
/libs/generators/tests/uuid.spec.ts
|
0 problems
|
|
|
/libs/models/src/index.ts
|
0 problems
|
|
|
/libs/models/src/interfaces/index.ts
|
0 problems
|
|
|
/libs/models/src/interfaces/person.ts
|
0 problems
|
|
|
/libs/models/src/models/index.ts
|
0 problems
|
|
|
/libs/models/src/models/person.ts
|
0 problems
|
|
|
/libs/models/tests/models/person.spec.ts
|
0 problems
|
|
|
/libs/patterns/src/command/command.ts
|
0 problems
|
|
|
/libs/patterns/src/command/index.ts
|
0 problems
|
|
|
/libs/patterns/src/command/manager.ts
|
0 problems
|
|
|
/libs/patterns/src/ecs/component.ts
|
0 problems
|
|
|
/libs/patterns/src/ecs/entity.ts
|
0 problems
|
|
|
/libs/patterns/src/ecs/index.ts
|
0 problems
|
|
|
/libs/patterns/src/ecs/system.ts
|
0 problems
|
|
|
/libs/patterns/src/ecs/world.interface.ts
|
0 problems
|
|
|
/libs/patterns/src/ecs/world.ts
|
0 problems
|
|
|
/libs/patterns/src/factory.ts
|
0 problems
|
|
|
/libs/patterns/src/index.ts
|
0 problems
|
|
|
/libs/patterns/src/iterable.ts
|
0 problems
|
|
|
/libs/patterns/src/iterator.ts
|
0 problems
|
|
|
/libs/patterns/src/money/account.ts
|
0 problems
|
|
|
/libs/patterns/src/money/currency.ts
|
0 problems
|
|
|
/libs/patterns/src/money/index.ts
|
0 problems
|
|
|
/libs/patterns/src/money/money.ts
|
0 problems
|
|
|
/libs/patterns/src/observer.ts
|
0 problems
|
|
|
/libs/patterns/src/singleton.ts
|
0 problems
|
|
|
/libs/patterns/tests/command.spec.ts
|
0 problems
|
|
|
/libs/patterns/tests/ecs/component.spec.ts
|
0 problems
|
|
|
/libs/patterns/tests/ecs/entity.spec.ts
|
0 problems
|
|
|
/libs/patterns/tests/ecs/world.spec.ts
|
0 problems
|
|
|
/libs/patterns/tests/factory.spec.ts
|
0 problems
|
|
|
/libs/patterns/tests/iterable.spec.ts
|
0 problems
|
|
|
/libs/patterns/tests/iterator.spec.ts
|
0 problems
|
|
|
/libs/patterns/tests/money/account.spec.ts
|
0 problems
|
|
|
/libs/patterns/tests/money/currency.spec.ts
|
0 problems
|
|
|
/libs/patterns/tests/money/money.spec.ts
|
0 problems
|
|
|
/libs/patterns/tests/observer.spec.ts
|
0 problems
|
|
|
/libs/patterns/tests/singleton.spec.ts
|
0 problems
|
|
|
/libs/roguelike-engine/src/entities/factory.ts
|
0 problems
|
|
|
/libs/roguelike-engine/src/entities/fungus.ts
|
0 problems
|
|
|
/libs/roguelike-engine/src/entities/index.ts
|
0 problems
|
|
|
/libs/roguelike-engine/src/game.ts
|
0 problems
|
|
|
/libs/roguelike-engine/src/index.ts
|
0 problems
|
|
|
/libs/roguelike-engine/src/screens/factory.ts
|
0 problems
|
|
|
/libs/roguelike-engine/src/screens/index.ts
|
0 problems
|
|
|
/libs/roguelike-engine/src/screens/lose.ts
|
0 problems
|
|
|
/libs/roguelike-engine/src/screens/play.ts
|
0 problems
|
|
|
/libs/roguelike-engine/src/screens/start.ts
|
0 problems
|
|
|
/libs/roguelike-engine/src/screens/win.ts
|
0 problems
|
|
|
/libs/roguelike-engine/tests/entities/factory.spec.ts
|
0 problems
|
|
|
/libs/roguelike-engine/tests/entities/fungus.spec.ts
|
0 problems
|
|
|
/libs/roguelike-engine/tests/game.spec.ts
|
0 problems
|
|
|
/libs/roguelike-engine/tests/screens/factory.spec.ts
|
0 problems
|
|
|
/libs/roguelike-engine/tests/screens/lose.spec.ts
|
0 problems
|
|
|
/libs/roguelike-engine/tests/screens/play.spec.ts
|
0 problems
|
|
|
/libs/roguelike-engine/tests/screens/start.spec.ts
|
0 problems
|
|
|
/libs/roguelike-engine/tests/screens/win.spec.ts
|
0 problems
|
|
|
/libs/strings/src/capitalize.ts
|
0 problems
|
|
|
/libs/strings/src/index.ts
|
0 problems
|
|
|
/libs/strings/src/leftpad.ts
|
0 problems
|
|
|
/libs/strings/tests/capitalize-every-word.spec.ts
|
0 problems
|
|
|
/libs/strings/tests/capitalize.spec.ts
|
0 problems
|
|
|
/libs/strings/tests/leftpad.spec.ts
|
0 problems
|
|
|
/libs/ui/button/src/button.svelte
|
0 problems
|
|
|
/libs/ui/button/src/global.d.ts
|
0 problems
|
|
|
/libs/ui/button/src/main.ts
|
0 problems
|
|
|
/libs/ui/button/tests/button.spec.ts
|
0 problems
|
|
|
/libs/ui/collapse/src/collapse.svelte
|
0 problems
|
|
|
/libs/ui/collapse/src/global.d.ts
|
0 problems
|
|
|
/libs/ui/collapse/src/main.ts
|
0 problems
|
|
|
/libs/ui/collapse/tests/collapse.spec.ts
|
0 problems
|
|
|
/libs/ui/leaderboard/src/global.d.ts
|
0 problems
|
|
|
/libs/ui/leaderboard/src/leaderboard.svelte
|
0 problems
|
|
|
/libs/ui/leaderboard/src/main.ts
|
0 problems
|
|
|
/libs/ui/leaderboard/tests/leaderboard.spec.ts
|
0 problems
|
|
|
/libs/ui/loader/src/global.d.ts
|
0 problems
|
|
|
/libs/ui/loader/src/loader.svelte
|
0 problems
|
|
|
/libs/ui/loader/src/main.ts
|
0 problems
|
|
|
/libs/ui/loader/tests/loader.spec.ts
|
0 problems
|
|
|
/libs/ui/placeholder-loader/src/global.d.ts
|
0 problems
|
|
|
/libs/ui/placeholder-loader/src/main.ts
|
0 problems
|
|
|
/libs/ui/placeholder-loader/src/placeholder-loader.svelte
|
0 problems
|
|
|
/libs/ui/placeholder-loader/tests/placeholder-loader.spec.ts
|
0 problems
|
|
|
/libs/ui/progress/src/global.d.ts
|
0 problems
|
|
|
/libs/ui/progress/src/main.ts
|
0 problems
|
|
|
/libs/ui/progress/src/progress.svelte
|
0 problems
|
|
|
/libs/ui/progress/tests/progress.spec.ts
|
0 problems
|
|
|
/libs/ui/table/src/global.d.ts
|
0 problems
|
|
|
/libs/ui/table/src/main.ts
|
0 problems
|
|
|
/libs/ui/table/src/table.svelte
|
0 problems
|
|
|
/libs/ui/table/tests/table.spec.ts
|
0 problems
|
|
|
/libs/ui/tabs/src/global.d.ts
|
0 problems
|
|
|
/libs/ui/tabs/src/main.ts
|
0 problems
|
|
|
/libs/ui/tabs/src/tabs.svelte
|
0 problems
|
|
|
/libs/ui/tabs/tests/tabs.spec.ts
|
0 problems
|