Skip to content

Commit e7fc427

Browse files
committed
Allow interface and empty objects in .d.ts files
closes #27
1 parent f115e22 commit e7fc427

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/configs/javascript.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
MOCKS_FILE_PATTERNS,
1717
SVELTE_FILE_PATTERN,
1818
TEST_FILE_PATTERNS,
19+
TYPESCRIPT_DECLARATION_FILE_PATTERNS,
1920
} from '../lib/patterns.js';
2021
import { convertErrorsToWarnings } from '../lib/utils.js';
2122

@@ -276,6 +277,14 @@ export default tseslint.config(
276277
'@typescript-eslint/no-require-imports': 'off',
277278
},
278279
},
280+
{
281+
name: 'code-pushup/javascript/dts/disabled',
282+
files: TYPESCRIPT_DECLARATION_FILE_PATTERNS,
283+
rules: {
284+
'@typescript-eslint/consistent-type-definitions': 'off',
285+
'@typescript-eslint/no-empty-object-type': 'off',
286+
},
287+
},
279288
{
280289
name: 'code-pushup/javascript/svelte/disabled',
281290
files: [SVELTE_FILE_PATTERN],

src/lib/patterns.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ export const TEST_FILE_PATTERNS_INLINE_TEMPLATES = TEST_FILE_PATTERNS.map(
5656

5757
export const TYPESCRIPT_FILE_PATTERNS = ['**/*.ts', '**/*.tsx'];
5858

59+
export const TYPESCRIPT_DECLARATION_FILE_PATTERNS = ['**/*.d.ts'];
60+
5961
export const JSON_FILE_PATTERNS = ['**/*.json', '**/*.jsonc'];
6062

6163
export const JS_TS_JSON_FILE_PATTERNS = [

0 commit comments

Comments
 (0)