Prevent reading .editorconfig in getParser (#17169)

This commit is contained in:
fisker Cheung authored and GitHub committed 2025-02-25 08:47:04 +08:00
1 parent 5dc7e8e54a
commit ff75442274
1 file changed
+4 -1
+4 -1
View File
@@ -45,7 +45,10 @@ async function getFileInfo(file, options) {
async function getParser(file, options) {
let config;
if (options.resolveConfig !== false) {
config = await resolveConfig(file);
config = await resolveConfig(file, {
// No need read `.editorconfig`
editorconfig: false,
});
}
return config?.parser ?? inferParser(options, { physicalFile: file });