Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💄 ensure all svelte routes pass the linter #99

Merged
merged 3 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/routes/company_view.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import { techexposure_company } from '../js/techexposure_company.js';
import { createErrorMessageDiv } from '../js/createErrorMessageDiv.js';
import * as d3 from 'd3';
import { union } from 'd3-array';
cjyetman marked this conversation as resolved.
Show resolved Hide resolved

onMount(async () => {
const exposureStatsDataResponse = await fetch('data/data_exposure_stats.json');
Expand Down
7 changes: 7 additions & 0 deletions src/routes/portfolio_view.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import { PieExploded } from '../js/pie_exploded.js';
import { techexposure } from '../js/techexposure';
import { tabulateIntoIncludedTable } from '../js/included_table.js';
import { createErrorMessageDiv } from '../js/createErrorMessageDiv.js';

onMount(async () => {
const tableDataResponse = await fetch('data/data_included_table.json');
Expand Down Expand Up @@ -34,6 +35,7 @@
"of assets' value covered by PACTA sectors"
);
} catch (err) {
console.error('Error fetching value pie for bonds', err);
document.querySelector('#valuePieBonds').innerHTML = '';
document.querySelector('#valuePieBonds').appendChild(createErrorMessageDiv());
}
Expand All @@ -45,6 +47,7 @@
"of assets' value covered by PACTA sectors"
);
} catch (err) {
console.error('Error fetching value pie for equity', err);
document.querySelector('#valuePieEquity').innerHTML = '';
document.querySelector('#valuePieEquity').appendChild(createErrorMessageDiv());
}
Expand All @@ -59,6 +62,7 @@
"of assets' emissions covered by PACTA sectors"
);
} catch (err) {
console.error('Error fetching emissions pie for bonds', err);
document.querySelector('#emissionsPieBonds').innerHTML = '';
document.querySelector('#emissionsPieBonds').appendChild(createErrorMessageDiv());
}
Expand All @@ -70,6 +74,7 @@
"of assets' emissions covered by PACTA sectors"
);
} catch (err) {
console.error('Error fetching emissions pie for equity', err);
document.querySelector('#emissionsPieEquity').innerHTML = '';
document.querySelector('#emissionsPieEquity').appendChild(createErrorMessageDiv());
}
Expand All @@ -85,6 +90,7 @@
techOrder
);
} catch (err) {
console.error('Error fetching techmix for bonds', err);
document.querySelector('#techMixAllBonds').innerHTML = '';
document.querySelector('#techMixAllBonds').appendChild(createErrorMessageDiv());
}
Expand All @@ -97,6 +103,7 @@
techOrder
);
} catch (err) {
console.error('Error fetching techmix for equity', err);
document.querySelector('#techMixAllEquity').innerHTML = '';
document.querySelector('#techMixAllEquity').appendChild(createErrorMessageDiv());
}
Expand Down
5 changes: 4 additions & 1 deletion src/routes/sector_view.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import { time_line } from '../js/time_line.js';
import { createErrorMessageDiv } from '../js/createErrorMessageDiv.js';
import * as d3 from 'd3';
import { union } from 'd3-array';

onMount(async () => {
const exposureStatsDataResponse = await fetch('data/data_exposure_stats.json');
Expand All @@ -26,6 +25,7 @@
try {
new ExposureStatsTile(document.querySelector('#exposure-stats'), exposureStatsData);
} catch (err) {
console.error('Error fetching exposure stats: ', err);
document.querySelector('#exposure-stats').innerHTML = '';
document.querySelector('#exposure-stats').appendChild(createErrorMessageDiv());
}
Expand All @@ -35,6 +35,7 @@
try {
new techmix_sector(document.querySelector('#techmix-plot'), techmixData);
} catch (err) {
console.error('Error fetching techmix: ', err);
document.querySelector('#techmix-plot').innerHTML = '';
document.querySelector('#techmix-plot').appendChild(createErrorMessageDiv());
}
Expand All @@ -51,6 +52,7 @@
document.querySelector('#trajectory-box').classList.add('hidden');
}
} catch (err) {
console.error('Error fetching trajectory alignment: ', err);
document.querySelector('#trajectory-box').innerHTML = '';
document.querySelector('#trajectory-box').appendChild(createErrorMessageDiv());
}
Expand All @@ -60,6 +62,7 @@
try {
new time_line(document.querySelector('#emission-intensity-plot'), emissionsData);
} catch (err) {
console.error('Error fetching emission intensity plot: ', err);
document.querySelector('#emission-intensity-plot').innerHTML = '';
document.querySelector('#emission-intensity-plot').appendChild(createErrorMessageDiv());
}
Expand Down
Loading