mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 11:05:54 +01:00 
			
		
		
		
	chore: eslint prefer-template
This commit is contained in:
		
				
					committed by
					
						 Julian Lam
						Julian Lam
					
				
			
			
				
	
			
			
			
						parent
						
							4ee0f1459d
						
					
				
				
					commit
					707b55b6a5
				
			| @@ -22,7 +22,7 @@ exports.reset = async function (options) { | ||||
| 			} else { | ||||
| 				if (!themeNamePattern.test(themeId)) { | ||||
| 					// Allow omission of `nodebb-theme-` | ||||
| 					themeId = 'nodebb-theme-' + themeId; | ||||
| 					themeId = `nodebb-theme-${themeId}`; | ||||
| 				} | ||||
|  | ||||
| 				await resetTheme(themeId); | ||||
| @@ -35,7 +35,7 @@ exports.reset = async function (options) { | ||||
| 			} else { | ||||
| 				if (!pluginNamePattern.test(pluginId)) { | ||||
| 					// Allow omission of `nodebb-plugin-` | ||||
| 					pluginId = 'nodebb-plugin-' + pluginId; | ||||
| 					pluginId = `nodebb-plugin-${pluginId}`; | ||||
| 				} | ||||
|  | ||||
| 				await resetPlugin(pluginId); | ||||
| @@ -56,7 +56,7 @@ exports.reset = async function (options) { | ||||
| 	if (!tasks.length) { | ||||
| 		console.log([ | ||||
| 			'No arguments passed in, so nothing was reset.\n'.yellow, | ||||
| 			'Use ./nodebb reset ' + '{-t|-p|-w|-s|-a}'.red, | ||||
| 			`Use ./nodebb reset ${'{-t|-p|-w|-s|-a}'.red}`, | ||||
| 			'    -t\tthemes', | ||||
| 			'    -p\tplugins', | ||||
| 			'    -w\twidgets', | ||||
| @@ -80,7 +80,7 @@ exports.reset = async function (options) { | ||||
| 		winston.info('[reset] Reset complete. Please run `./nodebb build` to rebuild assets.'); | ||||
| 		process.exit(0); | ||||
| 	} catch (err) { | ||||
| 		winston.error('[reset] Errors were encountered during reset -- ' + err.message); | ||||
| 		winston.error(`[reset] Errors were encountered during reset -- ${err.message}`); | ||||
| 		process.exit(1); | ||||
| 	} | ||||
| }; | ||||
| @@ -111,7 +111,7 @@ async function resetThemeTo(themeId) { | ||||
| 		id: themeId, | ||||
| 	}); | ||||
| 	await meta.configs.set('bootswatchSkin', ''); | ||||
| 	winston.info('[reset] Theme reset to ' + themeId + ' and default skin'); | ||||
| 	winston.info(`[reset] Theme reset to ${themeId} and default skin`); | ||||
| } | ||||
|  | ||||
| async function resetPlugin(pluginId) { | ||||
| @@ -133,7 +133,7 @@ async function resetPlugin(pluginId) { | ||||
| 			winston.info('[reset] No action taken.'); | ||||
| 		} | ||||
| 	} catch (err) { | ||||
| 		winston.error('[reset] Could not disable plugin: ' + pluginId + ' encountered error %s\n' + err.stack); | ||||
| 		winston.error(`[reset] Could not disable plugin: ${pluginId} encountered error %s\n${err.stack}`); | ||||
| 		throw err; | ||||
| 	} | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user