forked from MapComplete/MapComplete
		
	Fix linting script
This commit is contained in:
		
							parent
							
								
									65dbcd774b
								
							
						
					
					
						commit
						ae68a09775
					
				
					 1 changed files with 2 additions and 4 deletions
				
			
		|  | @ -10,8 +10,7 @@ import {FixLegacyTheme, UpdateLegacyLayer} from "../Models/ThemeConfig/Conversio | ||||||
| const layerFiles = ScriptUtils.getLayerFiles(); | const layerFiles = ScriptUtils.getLayerFiles(); | ||||||
| for (const layerFile of layerFiles) { | for (const layerFile of layerFiles) { | ||||||
|     try { |     try { | ||||||
|         const state: any = undefined; // FIXME
 |         const fixed = new UpdateLegacyLayer().convertStrict(layerFile.parsed, "While linting " + layerFile.path); | ||||||
|         const fixed = new UpdateLegacyLayer().convertStrict(state, layerFile.parsed, "While linting " + layerFile.path); |  | ||||||
|         writeFileSync(layerFile.path, JSON.stringify(fixed, null, "  ")) |         writeFileSync(layerFile.path, JSON.stringify(fixed, null, "  ")) | ||||||
|     } catch (e) { |     } catch (e) { | ||||||
|         console.error("COULD NOT LINT LAYER" + layerFile.path + ":\n\t" + e) |         console.error("COULD NOT LINT LAYER" + layerFile.path + ":\n\t" + e) | ||||||
|  | @ -21,8 +20,7 @@ for (const layerFile of layerFiles) { | ||||||
| const themeFiles = ScriptUtils.getThemeFiles() | const themeFiles = ScriptUtils.getThemeFiles() | ||||||
| for (const themeFile of themeFiles) { | for (const themeFile of themeFiles) { | ||||||
|     try { |     try { | ||||||
|         const state: any = undefined; // FIXME
 |         const fixed = new FixLegacyTheme().convertStrict(themeFile.parsed, "While linting " + themeFile.path); | ||||||
|         const fixed = new FixLegacyTheme().convertStrict(state, themeFile.parsed, "While linting " + themeFile.path); |  | ||||||
|         writeFileSync(themeFile.path, JSON.stringify(fixed, null, "  ")) |         writeFileSync(themeFile.path, JSON.stringify(fixed, null, "  ")) | ||||||
|     } catch (e) { |     } catch (e) { | ||||||
|         console.error("COULD NOT LINT THEME" + themeFile.path + ":\n\t" + e) |         console.error("COULD NOT LINT THEME" + themeFile.path + ":\n\t" + e) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue