mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 23:27:28 +02:00
refactor: make entire project typecheck with root tsconfig (#7466)
This commit is contained in:
parent
89b0fff128
commit
2d94d575a1
17 changed files with 74 additions and 36 deletions
|
@ -35,7 +35,9 @@ const scoreEntry = (rawScore) => {
|
|||
const createMarkdownTableRow = ({url, summary, reportUrl}) =>
|
||||
[
|
||||
`| [${new URL(url).pathname}](${url})`,
|
||||
...Object.keys(summaryKeys).map((k) => scoreEntry(summary[k])),
|
||||
.../** @type {(keyof LighthouseSummary)[]} */ (
|
||||
Object.keys(summaryKeys)
|
||||
).map((k) => scoreEntry(summary[k])),
|
||||
`[Report](${reportUrl}) |`,
|
||||
].join(' | ');
|
||||
|
||||
|
@ -54,8 +56,10 @@ const createMarkdownTableHeader = () => [
|
|||
const createLighthouseReport = ({results, links}) => {
|
||||
const tableHeader = createMarkdownTableHeader();
|
||||
const tableBody = results.map((result) => {
|
||||
const testUrl = Object.keys(links).find((key) => key === result.url);
|
||||
const reportPublicUrl = links[testUrl];
|
||||
const testUrl = /** @type {string} */ (
|
||||
Object.keys(links).find((key) => key === result.url)
|
||||
);
|
||||
const reportPublicUrl = /** @type {string} */ (links[testUrl]);
|
||||
|
||||
return createMarkdownTableRow({
|
||||
url: testUrl,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue