forked from MapComplete/MapComplete
Formatting
This commit is contained in:
parent
d5d2c08706
commit
72ca67e3ab
34 changed files with 616 additions and 566 deletions
|
@ -623,7 +623,9 @@ export class RewriteSpecial extends DesugaringStep<TagRenderingConfigJson> {
|
|||
}
|
||||
const param = special[arg.name]
|
||||
if (param === undefined) {
|
||||
errors.push(`At ${context}: Obligated parameter '${arg.name}' in special rendering of type ${vis.funcName} not found.\n${arg.doc}`)
|
||||
errors.push(
|
||||
`At ${context}: Obligated parameter '${arg.name}' in special rendering of type ${vis.funcName} not found.\n${arg.doc}`
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
import {DesugaringStep, Each, Fuse, On} from "./Conversion"
|
||||
import {LayerConfigJson} from "../Json/LayerConfigJson"
|
||||
import { DesugaringStep, Each, Fuse, On } from "./Conversion"
|
||||
import { LayerConfigJson } from "../Json/LayerConfigJson"
|
||||
import LayerConfig from "../LayerConfig"
|
||||
import {Utils} from "../../../Utils"
|
||||
import { Utils } from "../../../Utils"
|
||||
import Constants from "../../Constants"
|
||||
import {Translation} from "../../../UI/i18n/Translation"
|
||||
import {LayoutConfigJson} from "../Json/LayoutConfigJson"
|
||||
import { Translation } from "../../../UI/i18n/Translation"
|
||||
import { LayoutConfigJson } from "../Json/LayoutConfigJson"
|
||||
import LayoutConfig from "../LayoutConfig"
|
||||
import {TagRenderingConfigJson} from "../Json/TagRenderingConfigJson"
|
||||
import {TagUtils} from "../../../Logic/Tags/TagUtils"
|
||||
import {ExtractImages} from "./FixImages"
|
||||
import { TagRenderingConfigJson } from "../Json/TagRenderingConfigJson"
|
||||
import { TagUtils } from "../../../Logic/Tags/TagUtils"
|
||||
import { ExtractImages } from "./FixImages"
|
||||
import ScriptUtils from "../../../scripts/ScriptUtils"
|
||||
import {And} from "../../../Logic/Tags/And"
|
||||
import { And } from "../../../Logic/Tags/And"
|
||||
import Translations from "../../../UI/i18n/Translations"
|
||||
import Svg from "../../../Svg"
|
||||
import {QuestionableTagRenderingConfigJson} from "../Json/QuestionableTagRenderingConfigJson"
|
||||
import { QuestionableTagRenderingConfigJson } from "../Json/QuestionableTagRenderingConfigJson"
|
||||
import FilterConfigJson from "../Json/FilterConfigJson"
|
||||
import DeleteConfig from "../DeleteConfig"
|
||||
|
||||
|
@ -619,20 +619,31 @@ export class DetectMappingsWithImages extends DesugaringStep<TagRenderingConfigJ
|
|||
|
||||
class MiscTagRenderingChecks extends DesugaringStep<TagRenderingConfigJson> {
|
||||
constructor() {
|
||||
super("Miscellanious checks on the tagrendering", ["special"], "MiscTagREnderingChecksRew");
|
||||
super("Miscellanious checks on the tagrendering", ["special"], "MiscTagREnderingChecksRew")
|
||||
}
|
||||
|
||||
convert(json: TagRenderingConfigJson, context: string): { result: TagRenderingConfigJson; errors?: string[]; warnings?: string[]; information?: string[] } {
|
||||
const errors = []
|
||||
if(json["special"] !== undefined){
|
||||
errors.push("At "+context+": detected `special` on the top level. Did you mean `{\"render\":{ \"special\": ... }}`")
|
||||
convert(
|
||||
json: TagRenderingConfigJson,
|
||||
context: string
|
||||
): {
|
||||
result: TagRenderingConfigJson
|
||||
errors?: string[]
|
||||
warnings?: string[]
|
||||
information?: string[]
|
||||
} {
|
||||
const errors = []
|
||||
if (json["special"] !== undefined) {
|
||||
errors.push(
|
||||
"At " +
|
||||
context +
|
||||
': detected `special` on the top level. Did you mean `{"render":{ "special": ... }}`'
|
||||
)
|
||||
}
|
||||
return {
|
||||
result: json,
|
||||
errors
|
||||
};
|
||||
errors,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class ValidateTagRenderings extends Fuse<TagRenderingConfigJson> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue