From 39166ff806224590498d49b3711836613a5e4abe Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Sun, 26 Sep 2021 19:58:11 +0200 Subject: [PATCH] Linting of layer files --- .../layers/bike_repair_station/bike_repair_station.json | 7 ++++--- assets/layers/sport_pitch/sport_pitch.json | 4 ++-- assets/layers/tree_node/tree_node.json | 3 ++- scripts/lint.ts | 9 +++++---- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/assets/layers/bike_repair_station/bike_repair_station.json b/assets/layers/bike_repair_station/bike_repair_station.json index 5cef73ea7e..cd202c6c88 100644 --- a/assets/layers/bike_repair_station/bike_repair_station.json +++ b/assets/layers/bike_repair_station/bike_repair_station.json @@ -491,8 +491,8 @@ ], "id": "bike_repair_station-valves" }, - { "id": "bike_repair_station-electrical_pump", - + { + "id": "bike_repair_station-electrical_pump", "question": { "en": "Is this an electric bike pump?", "nl": "Is dit een electrische fietspomp?", @@ -535,7 +535,8 @@ } ] }, - { "id": "bike_repair_station-manometer", + { + "id": "bike_repair_station-manometer", "question": { "en": "Does the pump have a pressure indicator or manometer?", "nl": "Heeft deze pomp een luchtdrukmeter?", diff --git a/assets/layers/sport_pitch/sport_pitch.json b/assets/layers/sport_pitch/sport_pitch.json index 29920a853f..90f1dca732 100644 --- a/assets/layers/sport_pitch/sport_pitch.json +++ b/assets/layers/sport_pitch/sport_pitch.json @@ -386,8 +386,8 @@ "id": "sport_pitch-opening_hours" }, "questions", - { "id": "sport-pitch-reviews", - + { + "id": "sport-pitch-reviews", "render": "{reviews(name, sportpitch)}" } ], diff --git a/assets/layers/tree_node/tree_node.json b/assets/layers/tree_node/tree_node.json index 07b30d2205..bba09af121 100644 --- a/assets/layers/tree_node/tree_node.json +++ b/assets/layers/tree_node/tree_node.json @@ -238,7 +238,8 @@ } ] }, - { "id": "tree-decidouous", + { + "id": "tree-decidouous", "question": { "nl": "Is deze boom groenblijvend of bladverliezend?", "en": "Is this tree evergreen or deciduous?", diff --git a/scripts/lint.ts b/scripts/lint.ts index afa33e29f1..63cf1ab2f1 100644 --- a/scripts/lint.ts +++ b/scripts/lint.ts @@ -32,15 +32,16 @@ for (const layerFile of layerFiles) { fixLayerConfig(layerFile.parsed) writeFileSync(layerFile.path, JSON.stringify(layerFile.parsed, null, " ")) } - +/* const themeFiles = ScriptUtils.getThemeFiles() 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){ continue } // @ts-ignore fixLayerConfig(layerConfig) } - writeFileSync(themeFile.path, JSON.stringify(themeFile.parsed, null, " ")) -} \ No newline at end of file + // writeFileSync(themeFile.path, JSON.stringify(themeFile.parsed, null, " ")) +} +//*/ \ No newline at end of file