Skip to content

Commit 59dfae3

Browse files
committed
ci: configure code-pushup
1 parent 178d060 commit 59dfae3

File tree

4 files changed

+14301
-6811
lines changed

4 files changed

+14301
-6811
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ output*/
1111
ref*/
1212
dist/
1313
tsconfig.tsbuildinfo
14+
.code-pushup

code-pushup.config.ts

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import coveragePlugin from '@code-pushup/coverage-plugin';
2+
import eslintPlugin from '@code-pushup/eslint-plugin';
3+
import jsPackagesPlugin from '@code-pushup/js-packages-plugin';
4+
import type { CoreConfig } from '@code-pushup/models';
5+
6+
const config: CoreConfig = {
7+
plugins: [
8+
await eslintPlugin({
9+
eslintrc: {
10+
extends: [
11+
'@code-pushup/eslint-config/typescript',
12+
'@code-pushup/eslint-config/jest',
13+
],
14+
parserOptions: {
15+
project: 'tsconfig.json',
16+
},
17+
},
18+
patterns: 'src/**/*.ts',
19+
}),
20+
await coveragePlugin({
21+
coverageToolCommand: { command: 'npx', args: ['jest', '--coverage'] },
22+
reports: ['coverage/lcov.info'],
23+
}),
24+
await jsPackagesPlugin({ packageManager: 'npm' }),
25+
],
26+
27+
categories: [
28+
{
29+
slug: 'bug-prevention',
30+
title: 'Bug prevention',
31+
refs: [{ type: 'group', plugin: 'eslint', slug: 'problems', weight: 1 }],
32+
},
33+
{
34+
slug: 'code-style',
35+
title: 'Code style',
36+
refs: [
37+
{ type: 'group', plugin: 'eslint', slug: 'suggestions', weight: 1 },
38+
],
39+
},
40+
{
41+
slug: 'code-coverage',
42+
title: 'Code coverage',
43+
refs: [
44+
{ type: 'group', plugin: 'coverage', slug: 'coverage', weight: 1 },
45+
],
46+
},
47+
{
48+
slug: 'security',
49+
title: 'Security',
50+
refs: [
51+
{ type: 'group', plugin: 'js-packages', slug: 'npm-audit', weight: 1 },
52+
],
53+
},
54+
{
55+
slug: 'updates',
56+
title: 'Updates',
57+
refs: [
58+
{
59+
type: 'group',
60+
plugin: 'js-packages',
61+
slug: 'npm-outdated',
62+
weight: 1,
63+
},
64+
],
65+
},
66+
],
67+
};
68+
69+
export default config;

0 commit comments

Comments
 (0)