Skip to content

Commit

Permalink
fixed eslint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
SuragNuthulapaty committed Jan 10, 2024
1 parent 7099c91 commit a4d1516
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 13 deletions.
10 changes: 7 additions & 3 deletions src/components/DataDisclaimer.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<template>
<details class="data-disclaimer">
<summary>Note: Data only includes large Chicago buildings from {{ LatestDataYear }}, unless explicitly stated otherwise.</summary>
<summary>
Note: Data only includes large Chicago buildings from {{ LatestDataYear }},
unless explicitly stated otherwise.
</summary>

<p class="constrained">
<strong>Note:</strong> This data only includes buildings whose emissions are reported
Expand All @@ -18,7 +21,8 @@
</p>

<p class="constrained">
This data is also from {{ LatestDataYear }}, but when new benchmark data is available, we'll update the site.
This data is also from {{ LatestDataYear }}, but when new benchmark data
is available, we'll update the site.
</p>
</details>
</template>
Expand All @@ -38,7 +42,7 @@ import { Component, Vue } from 'vue-property-decorator';
components: {NewTabIcon},
})
export default class DataDisclaimer extends Vue {
readonly LatestDataYear: number = LatestDataYear
readonly LatestDataYear: number = LatestDataYear;
}
</script>

Expand Down
2 changes: 1 addition & 1 deletion src/constants/globals.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script lang="ts">
export default {};
export const LatestDataYear = 2021
export const LatestDataYear = 2021;
</script>
7 changes: 4 additions & 3 deletions src/pages/About.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { LatestDataYear } from '../constants/globals.vue';
},
})
export default class About extends Vue {
readonly LatestDataYear: number = LatestDataYear
readonly LatestDataYear: number = LatestDataYear;
}
</script>
<template>
Expand Down Expand Up @@ -119,8 +119,9 @@ export default class About extends Vue {
</a>, which is data collected and published under the
<a href="https://www.chicago.gov/city/en/progs/env/building-energy-benchmarking---transparency.html">
Chicago Energy Benchmarking Ordinance <NewTabIcon />
</a>. This site shows data for the year {{ LatestDataYear }} (the latest available of March 2023) and
filtered down to buildings with total emissions > 1,000 metric tons CO<sub>2</sub>
</a>. This site shows data for the year {{ LatestDataYear }}
(the latest available of March 2023) and filtered down to buildings
with total emissions > 1,000 metric tons CO<sub>2</sub>
equivalent.
</p>

Expand Down
10 changes: 5 additions & 5 deletions src/pages/BiggestBuildings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { LatestDataYear } from '../constants/globals.vue';
},
})
export default class BiggestBuildings extends Vue {
readonly LatestDataYear: number = LatestDataYear
readonly LatestDataYear: number = LatestDataYear;
}
</script>

Expand Down Expand Up @@ -66,10 +66,10 @@ export default class BiggestBuildings extends Vue {

<p class="constrained -wide">
These are the biggest buildings in our dataset, which should encompass all of the largest
buildings in the city that submitted their energy use for {{ LatestDataYear }}. Being a big building does
basically guarantee that you use a lot of energy (and emit a lot of CO<sub>2</sub>), but a lot
of big buildings are very energy efficient and use less energy per square foot than much
smaller buildings!
buildings in the city that submitted their energy use for {{ LatestDataYear }}.
Being a big building does basically guarantee that you use a lot of energy
(and emit a lot of CO<sub>2</sub>), but a lot of big buildings are very energy
efficient and use less energy per square foot than much smaller buildings!
</p>

<DataDisclaimer />
Expand Down
3 changes: 2 additions & 1 deletion src/templates/BuildingDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ import NewTabIcon from '~/components/NewTabIcon.vue';
import OverallRankEmoji from '~/components/OverallRankEmoji.vue';
import OwnerLogo from '~/components/OwnerLogo.vue';
import StatTile from '~/components/StatTile.vue';
import { LatestDataYear } from '../constants/globals.vue';
// This simple JSON is a lot easier to just use directly than going through GraphQL and it's
// tiny
Expand Down Expand Up @@ -447,7 +448,7 @@ export default class BuildingDetails extends Vue {
* The year most/the latest buildings data is from - if this building's year is older than this,
* we show a warning that the data is old
*/
readonly LatestDataYear: number = 2021;
readonly LatestDataYear: number = LatestDataYear;
/** Set by Gridsome to results of GraphQL query */
$page: any;
Expand Down

0 comments on commit a4d1516

Please sign in to comment.