File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 11import { getPrecedence , shouldFlatten , isBitwiseOperator } from "./util.mjs" ;
22
3- function needsParens ( path ) {
3+ function needsParens ( path , options ) {
44 const { parent } = path ;
55
66 if ( ! parent ) {
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ import {
3737 isReferenceLikeNode ,
3838 normalizeMagicMethodName ,
3939 isSimpleCallArgument ,
40+ isMinVersion ,
4041} from "./util.mjs" ;
4142
4243const {
@@ -65,10 +66,6 @@ const {
6566 isPreviousLineEmpty,
6667} = prettierUtil ;
6768
68- function isMinVersion ( actualVersion , requiredVersion ) {
69- return parseFloat ( actualVersion ) >= parseFloat ( requiredVersion ) ;
70- }
71-
7269function shouldPrintComma ( options , requiredVersion ) {
7370 if ( ! options . trailingCommaPHP ) {
7471 return false ;
Original file line number Diff line number Diff line change @@ -709,6 +709,10 @@ function memoize(fn) {
709709 } ;
710710}
711711
712+ function isMinVersion ( actualVersion , requiredVersion ) {
713+ return parseFloat ( actualVersion ) >= parseFloat ( requiredVersion ) ;
714+ }
715+
712716export {
713717 printNumber ,
714718 getPrecedence ,
@@ -740,4 +744,5 @@ export {
740744 normalizeMagicMethodName ,
741745 isSimpleCallArgument ,
742746 memoize ,
747+ isMinVersion ,
743748} ;
You can’t perform that action at this time.
0 commit comments