additional eslint rules

This commit is contained in:
Matt Walsh
2023-01-06 14:39:39 -06:00
parent b890b4e53d
commit 3743c45de6
26 changed files with 1079 additions and 184 deletions

View File

@@ -28,9 +28,9 @@ const getRegionalObservation = async (point, city) => {
preloadImg(icon);
// return the observation
return observation.properties;
} catch (e) {
} catch (error) {
console.log(`Unable to get regional observations for ${city.Name ?? city.city}`);
console.error(e.status, e.responseJSON);
console.error(error.status, error.responseJSON);
return false;
}
};
@@ -195,7 +195,7 @@ const getXYForCityHI = (City, MaxLatitude, MinLongitude) => {
};
// to fit on the map, remove anything after punctuation and then limit to 15 characters
const formatCity = (city) => city.match(/[^-;/\\,]*/)[0].substr(0, 12);
const formatCity = (city) => city.match(/[^,/;\\-]*/)[0].substr(0, 12);
export {
buildForecast,