Skip to content

Commit 67b9fb4

Browse files
committed
feedback: Removed export *
1 parent 8c4be33 commit 67b9fb4

File tree

3 files changed

+26
-17
lines changed

3 files changed

+26
-17
lines changed

src/parsers/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export * from './convert-ast.js';
2-
export * from './preprocess.js';
1+
export { convertAst } from './convert-ast.js';
2+
export { preprocess } from './preprocess.js';

src/printers/ignore.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,7 @@ import type { AstPath } from 'prettier';
22

33
import type { NodeType } from '../utils/index.js';
44

5-
export function checkPrettierIgnore(path: AstPath<NodeType>): boolean {
6-
if (hasPrettierIgnore(path)) {
7-
return true;
8-
}
9-
10-
return (
11-
Boolean(path.getParentNode()) &&
12-
path.callParent((parent) => checkPrettierIgnore(parent))
13-
);
14-
}
15-
16-
export function hasPrettierIgnore(path: AstPath<NodeType>): boolean {
5+
function hasPrettierIgnore(path: AstPath<NodeType>): boolean {
176
let possibleComment = path.node?.leadingComments?.at(-1)?.value.trim();
187

198
// @ts-expect-error Comments exist on node sometimes
@@ -25,3 +14,14 @@ export function hasPrettierIgnore(path: AstPath<NodeType>): boolean {
2514

2615
return possibleComment === 'prettier-ignore';
2716
}
17+
18+
export function checkPrettierIgnore(path: AstPath<NodeType>): boolean {
19+
if (hasPrettierIgnore(path)) {
20+
return true;
21+
}
22+
23+
return (
24+
Boolean(path.getParentNode()) &&
25+
path.callParent((parent) => checkPrettierIgnore(parent))
26+
);
27+
}

src/printers/index.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1-
export * from './ambiguity.js';
2-
export * from './ignore.js';
3-
export * from './print.js';
1+
export {
2+
fixPreviousPrint,
3+
saveCurrentPrintOnSiblingNode,
4+
} from './ambiguity.js';
5+
export { checkPrettierIgnore } from './ignore.js';
6+
export {
7+
docMatchesString,
8+
printRawText,
9+
printTemplateContent,
10+
printTemplateTag,
11+
trimPrinted,
12+
} from './print.js';

0 commit comments

Comments
 (0)