Remove obsolete keys through lint script (once more)
This commit is contained in:
parent
c7386007bc
commit
b928bcda6f
54 changed files with 18 additions and 1187 deletions
|
@ -47,6 +47,11 @@ class LayerOverviewUtils {
|
|||
if (layerJson["overpassTags"] !== undefined) {
|
||||
errorCount.push("Layer " + layerJson.id + "still uses the old 'overpassTags'-format. Please use \"source\": {\"osmTags\": <tags>}' instead of \"overpassTags\": <tags> (note: this isn't your fault, the custom theme generator still spits out the old format)")
|
||||
}
|
||||
const forbiddenTopLevel = ["icon","wayHandling","roamingRenderings","roamingRendering","label","width","color","colour","iconOverlays"]
|
||||
for (const forbiddenKey of forbiddenTopLevel) {
|
||||
if(layerJson[forbiddenKey] !== undefined)
|
||||
errorCount.push("Layer "+layerJson.id+" still has a forbidden key "+forbiddenKey)
|
||||
}
|
||||
try {
|
||||
const layer = new LayerConfig(layerJson, "test", true)
|
||||
const images = Array.from(layer.ExtractImages())
|
||||
|
|
|
@ -10,7 +10,7 @@ import LegacyJsonConvert from "../Models/ThemeConfig/LegacyJsonConvert";
|
|||
const layerFiles = ScriptUtils.getLayerFiles();
|
||||
for (const layerFile of layerFiles) {
|
||||
LegacyJsonConvert.fixLayerConfig(layerFile.parsed)
|
||||
writeFileSync(layerFile.path, JSON.stringify(layerFile.parsed, null, " "))
|
||||
writeFileSync(layerFile.path, JSON.stringify(layerFile.parsed, null, " "))
|
||||
}
|
||||
|
||||
const themeFiles = ScriptUtils.getThemeFiles()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue