Skip to content

Commit 3ab00da

Browse files
committed
refactor: Simplified TS config
1 parent ddffb1f commit 3ab00da

File tree

7 files changed

+13
-15
lines changed

7 files changed

+13
-15
lines changed

@types/prettier/plugins/estree.d.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/parsers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { File } from '@babel/types';
22
import type { Parser, ParserOptions } from 'prettier';
3-
import { parsers as prettierParsers } from 'prettier/plugins/babel.js';
3+
import { parsers as prettierParsers } from 'prettier/plugins/babel';
44

55
import { convertAst, preprocess } from './parsers/index.js';
66
import { assert } from './utils/assert.js';

src/printers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { type AstPath, doc as AST, type Printer } from 'prettier';
2-
import { printers as prettierPrinters } from 'prettier/plugins/estree.js';
2+
import { printers as prettierPrinters } from 'prettier/plugins/estree';
33

44
import type { PluginOptions } from './options.js';
55
import {

src/printers/ambiguity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { AstPath, doc as AST, Printer } from 'prettier';
2-
import { printers as prettierPrinters } from 'prettier/plugins/estree.js';
2+
import { printers as prettierPrinters } from 'prettier/plugins/estree';
33

44
import type { PluginOptions } from '../options.js';
55
import { flattenDoc } from '../utils/doc.js';

tsconfig.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@
99
"resolveJsonModule": true,
1010
"isolatedModules": true,
1111
"verbatimModuleSyntax": true,
12-
"noEmit": true,
13-
14-
"paths": {
15-
"*": ["./@types/*"]
16-
}
12+
"noEmit": true
1713
},
18-
"include": ["src"]
14+
"include": ["src", "types"]
1915
}

tsconfig.lint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
"noEmit": true,
55
"allowJs": true
66
},
7-
"include": ["src", "tests", "vite.config.ts"]
7+
"include": ["src", "tests", "types", "vite.config.ts"]
88
}

types/prettier.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import type { Printer } from 'prettier';
2+
3+
declare module 'prettier/plugins/estree' {
4+
export const printers: {
5+
estree: Printer;
6+
};
7+
}

0 commit comments

Comments
 (0)