File tree Expand file tree Collapse file tree 1 file changed +4
-17
lines changed Expand file tree Collapse file tree 1 file changed +4
-17
lines changed Original file line number Diff line number Diff line change @@ -79,9 +79,7 @@ async function getPrettierConfigPath(
79
79
) : Promise < string | null > {
80
80
// Locating the config file can be mildly expensive so we cache it temporarily
81
81
let existingPath = prettierConfigCache . get ( options . filepath )
82
- if ( existingPath !== undefined ) {
83
- return existingPath
84
- }
82
+ if ( existingPath !== undefined ) return existingPath
85
83
86
84
let path = await prettier . resolveConfigFile ( options . filepath )
87
85
prettierConfigCache . set ( options . filepath , path )
@@ -90,21 +88,10 @@ async function getPrettierConfigPath(
90
88
}
91
89
92
90
async function getBaseDir ( options : ParserOptions ) : Promise < string > {
93
- let prettierConfigPath = await getPrettierConfigPath ( options )
94
-
95
- if ( options . tailwindConfig ) {
96
- return prettierConfigPath ? path . dirname ( prettierConfigPath ) : process . cwd ( )
97
- }
91
+ if ( options . filepath ) return path . dirname ( options . filepath )
98
92
99
- if ( options . tailwindEntryPoint ) {
100
- return prettierConfigPath ? path . dirname ( prettierConfigPath ) : process . cwd ( )
101
- }
102
-
103
- return prettierConfigPath
104
- ? path . dirname ( prettierConfigPath )
105
- : options . filepath
106
- ? path . dirname ( options . filepath )
107
- : process . cwd ( )
93
+ let prettierConfigPath = await getPrettierConfigPath ( options )
94
+ return prettierConfigPath ? path . dirname ( prettierConfigPath ) : process . cwd ( )
108
95
}
109
96
110
97
async function loadTailwindConfig (
You can’t perform that action at this time.
0 commit comments