Skip to content

Commit ae31e2c

Browse files
committed
add type safety checking category
1 parent 9d70215 commit ae31e2c

File tree

2 files changed

+77
-0
lines changed

2 files changed

+77
-0
lines changed

apps/ng-demo/eslint.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,10 @@ export default tsESLint.config(...baseConfig, ...angular, ...storybook, {
1313
},
1414
rules: {
1515
'@angular-eslint/prefer-standalone': 'error',
16+
17+
'@typescript-eslint/explicit-module-boundary-types': 'error',
18+
'@typescript-eslint/prefer-readonly': 'warn',
19+
'@typescript-eslint/prefer-readonly-parameter-types': 'warn',
20+
'@typescript-eslint/prefer-ts-expect-error': 'error',
1621
},
1722
});

code-pushup.config.ts

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,78 @@ const esLintConfig: CoreConfig = {
7878
},
7979
].map((ref) => ({ ...ref, slug: slugify(ref.slug) })),
8080
},
81+
{
82+
slug: 'type-safety',
83+
title: 'Type safety',
84+
refs: [
85+
{
86+
type: 'audit' as const,
87+
plugin: 'eslint',
88+
slug: '@typescript-eslint/no-explicit-any',
89+
weight: 3,
90+
},
91+
{
92+
type: 'audit' as const,
93+
plugin: 'eslint',
94+
slug: '@typescript-eslint/explicit-module-boundary-types',
95+
weight: 1,
96+
},
97+
{
98+
type: 'audit' as const,
99+
plugin: 'eslint',
100+
slug: '@typescript-eslint/no-non-null-assertion',
101+
weight: 2,
102+
},
103+
{
104+
type: 'audit' as const,
105+
plugin: 'eslint',
106+
slug: '@typescript-eslint/no-floating-promises',
107+
weight: 1,
108+
},
109+
{
110+
type: 'audit' as const,
111+
plugin: 'eslint',
112+
slug: '@typescript-eslint/no-unnecessary-type-assertion',
113+
weight: 1,
114+
},
115+
{
116+
type: 'audit' as const,
117+
plugin: 'eslint',
118+
slug: '@typescript-eslint/no-misused-promises',
119+
weight: 1,
120+
},
121+
{
122+
type: 'audit' as const,
123+
plugin: 'eslint',
124+
slug: '@typescript-eslint/prefer-readonly',
125+
weight: 1,
126+
},
127+
{
128+
type: 'audit' as const,
129+
plugin: 'eslint',
130+
slug: '@typescript-eslint/prefer-readonly-parameter-types',
131+
weight: 1,
132+
},
133+
{
134+
type: 'audit' as const,
135+
plugin: 'eslint',
136+
slug: '@typescript-eslint/prefer-optional-chain',
137+
weight: 1,
138+
},
139+
{
140+
type: 'audit' as const,
141+
plugin: 'eslint',
142+
slug: '@typescript-eslint/prefer-ts-expect-error',
143+
weight: 1,
144+
},
145+
{
146+
type: 'audit' as const,
147+
plugin: 'eslint',
148+
slug: '@typescript-eslint/unified-signatures',
149+
weight: 1,
150+
},
151+
].map((ref) => ({ ...ref, slug: slugify(ref.slug) })),
152+
},
81153
],
82154
};
83155

0 commit comments

Comments
 (0)