Linting of layer files

This commit is contained in:
pietervdvn 2021-09-26 19:58:11 +02:00
parent 01d80ef4e8
commit 39166ff806
4 changed files with 13 additions and 10 deletions

View file

@ -491,8 +491,8 @@
], ],
"id": "bike_repair_station-valves" "id": "bike_repair_station-valves"
}, },
{ "id": "bike_repair_station-electrical_pump", {
"id": "bike_repair_station-electrical_pump",
"question": { "question": {
"en": "Is this an electric bike pump?", "en": "Is this an electric bike pump?",
"nl": "Is dit een electrische fietspomp?", "nl": "Is dit een electrische fietspomp?",
@ -535,7 +535,8 @@
} }
] ]
}, },
{ "id": "bike_repair_station-manometer", {
"id": "bike_repair_station-manometer",
"question": { "question": {
"en": "Does the pump have a pressure indicator or manometer?", "en": "Does the pump have a pressure indicator or manometer?",
"nl": "Heeft deze pomp een luchtdrukmeter?", "nl": "Heeft deze pomp een luchtdrukmeter?",

View file

@ -386,8 +386,8 @@
"id": "sport_pitch-opening_hours" "id": "sport_pitch-opening_hours"
}, },
"questions", "questions",
{ "id": "sport-pitch-reviews", {
"id": "sport-pitch-reviews",
"render": "{reviews(name, sportpitch)}" "render": "{reviews(name, sportpitch)}"
} }
], ],

View file

@ -238,7 +238,8 @@
} }
] ]
}, },
{ "id": "tree-decidouous", {
"id": "tree-decidouous",
"question": { "question": {
"nl": "Is deze boom groenblijvend of bladverliezend?", "nl": "Is deze boom groenblijvend of bladverliezend?",
"en": "Is this tree evergreen or deciduous?", "en": "Is this tree evergreen or deciduous?",

View file

@ -32,15 +32,16 @@ for (const layerFile of layerFiles) {
fixLayerConfig(layerFile.parsed) fixLayerConfig(layerFile.parsed)
writeFileSync(layerFile.path, JSON.stringify(layerFile.parsed, null, " ")) writeFileSync(layerFile.path, JSON.stringify(layerFile.parsed, null, " "))
} }
/*
const themeFiles = ScriptUtils.getThemeFiles() const themeFiles = ScriptUtils.getThemeFiles()
for (const themeFile of themeFiles) { for (const themeFile of themeFiles) {
for (const layerConfig of themeFile.parsed.layers) { for (const layerConfig of themeFile.parsed.layers ?? []) {
if(typeof layerConfig === "string" || layerConfig["builtin"]!== undefined){ if(typeof layerConfig === "string" || layerConfig["builtin"]!== undefined){
continue continue
} }
// @ts-ignore // @ts-ignore
fixLayerConfig(layerConfig) fixLayerConfig(layerConfig)
} }
writeFileSync(themeFile.path, JSON.stringify(themeFile.parsed, null, " ")) // writeFileSync(themeFile.path, JSON.stringify(themeFile.parsed, null, " "))
} }
//*/