weareinreach / InReach

Found unused expressions JS-0093
Bug risk
Minor
16 days ago8 months old
151						setSupplements(suppRequired)
152					}
153					form.setValue('attributeId', item.value)
154					selectAttrRef.current && (selectAttrRef.current.value = '')155				}
156			},
157			[attributesByCategory, form, needsSupplementalData]
Found unused expression
18
19const postgresLocalUrlRegex = /^postgres:\/\/(?:([^:]+):([^@]+)@)?(?:localhost|127\.0\.0\.1)(:\d+)?\/([^?]+)/
20
21yargs(hideBin(process.argv))22	.demandCommand(1)23	.command(24		'up',25		'Start docker containers',26		() => {},27		async () => {28			if (process.env.DATABASE_URL && postgresLocalUrlRegex.test(process.env.DATABASE_URL)) {29				console.log("Starting docker...")30				await compose.upAll({31					config: dockerComposeFile,32					callback: (chunk) => console.log(chunk.toString()),33				})34			} else {35				console.log("Skipping docker start, DATABASE_URL is not set to a local address")36			}37		}38	)39	.command(40		'down',41		'Stop docker containers',42		() => {},43		async () => {44			try {45				await compose.ps({ config: dockerComposeFile })4647				await compose.downAll({48					config: dockerComposeFile,49					callback: (chunk) => console.log(chunk.toString()),50				})51			} catch (err) {52				if (err instanceof Error) {53					console.error(err.message)54				}55			}56		}57	).argv