Skip to content
Draft
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
13 changes: 12 additions & 1 deletion .github/actions/code-pushup/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
{
"extends": "../../../tsconfig.base.json",
"include": ["src/**/*"]
"include": ["src/**/*"],
"references": [
{
"path": "../../../packages/utils"
},
{
"path": "../../../packages/models"
},
{
"path": "../../../packages/ci"
}
]
}
18 changes: 18 additions & 0 deletions e2e/ci-e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,24 @@
"files": [],
"include": [],
"references": [
{
"path": "../../testing/test-setup-config"
},
{
"path": "../../testing/test-utils"
},
{
"path": "../../testing/test-nx-utils"
},
{
"path": "../../packages/utils"
},
{
"path": "../../packages/models"
},
{
"path": "../../packages/ci"
},
{
"path": "./tsconfig.test.json"
}
Expand Down
15 changes: 15 additions & 0 deletions e2e/cli-e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
"files": [],
"include": [],
"references": [
{
"path": "../../testing/test-setup-config"
},
{
"path": "../../packages/utils"
},
{
"path": "../../testing/test-utils"
},
{
"path": "../../testing/test-nx-utils"
},
{
"path": "../../packages/models"
},
{
"path": "./tsconfig.test.json"
}
Expand Down
12 changes: 12 additions & 0 deletions e2e/create-cli-e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
"files": [],
"include": [],
"references": [
{
"path": "../../testing/test-setup-config"
},
{
"path": "../../packages/utils"
},
{
"path": "../../testing/test-utils"
},
{
"path": "../../testing/test-nx-utils"
},
{
"path": "./tsconfig.test.json"
}
Expand Down
15 changes: 15 additions & 0 deletions e2e/nx-plugin-e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
"files": [],
"include": [],
"references": [
{
"path": "../../testing/test-setup-config"
},
{
"path": "../../packages/utils"
},
{
"path": "../../testing/test-utils"
},
{
"path": "../../testing/test-nx-utils"
},
{
"path": "../../packages/nx-plugin"
},
{
"path": "./tsconfig.test.json"
}
Expand Down
21 changes: 21 additions & 0 deletions e2e/plugin-axe-e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,27 @@
"files": [],
"include": [],
"references": [
{
"path": "../../testing/test-setup-config"
},
{
"path": "../../packages/utils"
},
{
"path": "../../testing/test-utils"
},
{
"path": "../../testing/test-nx-utils"
},
{
"path": "../../testing/test-fixtures"
},
{
"path": "../../packages/models"
},
{
"path": "../../packages/plugin-axe"
},
{
"path": "./tsconfig.test.json"
}
Expand Down
21 changes: 21 additions & 0 deletions e2e/plugin-coverage-e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,27 @@
"files": [],
"include": [],
"references": [
{
"path": "../../testing/test-setup-config"
},
{
"path": "../../packages/utils"
},
{
"path": "../../testing/test-utils"
},
{
"path": "../../testing/test-nx-utils"
},
{
"path": "../../testing/test-fixtures"
},
{
"path": "../../packages/models"
},
{
"path": "../../packages/plugin-coverage"
},
{
"path": "./tsconfig.test.json"
}
Expand Down
21 changes: 21 additions & 0 deletions e2e/plugin-eslint-e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,27 @@
"files": [],
"include": [],
"references": [
{
"path": "../../testing/test-setup-config"
},
{
"path": "../../packages/utils"
},
{
"path": "../../testing/test-utils"
},
{
"path": "../../testing/test-nx-utils"
},
{
"path": "../../testing/test-fixtures"
},
{
"path": "../../packages/models"
},
{
"path": "../../packages/plugin-eslint"
},
{
"path": "./tsconfig.test.json"
}
Expand Down
18 changes: 18 additions & 0 deletions e2e/plugin-js-packages-e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,24 @@
"files": [],
"include": [],
"references": [
{
"path": "../../testing/test-setup-config"
},
{
"path": "../../packages/utils"
},
{
"path": "../../testing/test-utils"
},
{
"path": "../../testing/test-nx-utils"
},
{
"path": "../../packages/models"
},
{
"path": "../../packages/plugin-js-packages"
},
{
"path": "./tsconfig.test.json"
}
Expand Down
21 changes: 21 additions & 0 deletions e2e/plugin-jsdocs-e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,27 @@
"files": [],
"include": [],
"references": [
{
"path": "../../testing/test-setup-config"
},
{
"path": "../../packages/utils"
},
{
"path": "../../testing/test-utils"
},
{
"path": "../../testing/test-nx-utils"
},
{
"path": "../../testing/test-fixtures"
},
{
"path": "../../packages/models"
},
{
"path": "../../packages/plugin-jsdocs"
},
{
"path": "./tsconfig.test.json"
}
Expand Down
21 changes: 21 additions & 0 deletions e2e/plugin-lighthouse-e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,27 @@
"files": [],
"include": [],
"references": [
{
"path": "../../testing/test-setup-config"
},
{
"path": "../../packages/utils"
},
{
"path": "../../testing/test-utils"
},
{
"path": "../../testing/test-nx-utils"
},
{
"path": "../../testing/test-fixtures"
},
{
"path": "../../packages/models"
},
{
"path": "../../packages/plugin-lighthouse"
},
{
"path": "./tsconfig.test.json"
}
Expand Down
21 changes: 21 additions & 0 deletions e2e/plugin-typescript-e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,27 @@
"files": [],
"include": [],
"references": [
{
"path": "../../testing/test-setup-config"
},
{
"path": "../../packages/utils"
},
{
"path": "../../testing/test-utils"
},
{
"path": "../../testing/test-nx-utils"
},
{
"path": "../../testing/test-fixtures"
},
{
"path": "../../packages/plugin-typescript"
},
{
"path": "../../packages/models"
},
{
"path": "./tsconfig.test.json"
}
Expand Down
43 changes: 21 additions & 22 deletions examples/plugins/src/lighthouse/src/lighthouse.plugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type Result from 'lighthouse/types/lhr/lhr';
import type { Result } from 'lighthouse';
import path from 'node:path';
import type {
AuditOutput,
Expand Down Expand Up @@ -109,32 +109,31 @@ export function runnerConfig(options: LighthouseCliOptions): RunnerConfig {
}

function lhrToAuditOutputs(lhr: Result): AuditOutputs {
return Object.values(lhr.audits).map(
({
return Object.values(lhr.audits).map((audit: Result['audits'][string]) => {
const {
id: slug,
score,
numericValue: value = 0, // not every audit has a numericValue
displayValue,
details,
}) => {
const auditOutput: AuditOutput = {
slug,
score: score ?? 0, // score can be null
value: Number.parseInt(value.toString(), 10),
displayValue,
};
} = audit;
const auditOutput: AuditOutput = {
slug,
score: score ?? 0, // score can be null
value: Number.parseInt(value.toString(), 10),
displayValue,
};

const issues = lhrDetailsToIssueDetails(details);
if (issues) {
return {
...auditOutput,
details: {
issues,
},
};
}
const issues = lhrDetailsToIssueDetails(details);
if (issues) {
return {
...auditOutput,
details: {
issues,
},
};
}

return auditOutput;
},
);
return auditOutput;
});
}
2 changes: 1 addition & 1 deletion examples/plugins/src/lighthouse/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type Result from 'lighthouse/types/lhr/lhr';
import type { Result } from 'lighthouse';
import { type Issue, MAX_ISSUE_MESSAGE_LENGTH } from '@code-pushup/models';
import { objectToCliArgs, toArray } from '@code-pushup/utils';
import { LIGHTHOUSE_REPORT_NAME } from './constants.js';
Expand Down
2 changes: 1 addition & 1 deletion examples/plugins/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"module": "ESNext",
"module": "NodeNext",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
Expand Down
14 changes: 14 additions & 0 deletions examples/plugins/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,19 @@
"src/**/*.test.ts",
"src/**/*.mock.ts",
"mocks/**/*.ts"
],
"references": [
{
"path": "../../testing/test-setup-config/tsconfig.lib.json"
},
{
"path": "../../packages/utils/tsconfig.lib.json"
},
{
"path": "../../packages/models/tsconfig.lib.json"
},
{
"path": "../../packages/core/tsconfig.lib.json"
}
]
}
Loading
Loading