File tree Expand file tree Collapse file tree 3 files changed +26
-17
lines changed
Expand file tree Collapse file tree 3 files changed +26
-17
lines changed Original file line number Diff line number Diff line change 1- export * from './convert-ast.js' ;
2- export * from './preprocess.js' ;
1+ export { convertAst } from './convert-ast.js' ;
2+ export { preprocess } from './preprocess.js' ;
Original file line number Diff line number Diff line change @@ -2,18 +2,7 @@ import type { AstPath } from 'prettier';
22
33import 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+ }
Original file line number Diff line number Diff line change 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' ;
You can’t perform that action at this time.
0 commit comments