Fix inferredParser when calling getFileInfo() with resolveConfig: true (#8551)
This commit is contained in:
1 parent
11d0f4203e
commit
fbf0beb716
9 files changed
+213
-169
No files matched your search
@@ -98,6 +98,8 @@ The promise will be rejected if the type of `filePath` is not `string`.
|
||||
|
||||
Setting `options.ignorePath` (`string`) and `options.withNodeModules` (`boolean`) influence the value of `ignored` (`false` by default).
|
||||
|
||||
If the given `filePath` is ignored, the `inferredParser` is always `null`.
|
||||
|
||||
Providing [plugin](plugins.md) paths in `options.plugins` (`string[]`) helps extract `inferredParser` for files that are not supported by Prettier core.
|
||||
|
||||
When setting `options.resolveConfig` (`boolean`, default `false`), Prettier will resolve the configuration for the given `filePath`. This is useful, for example, when the `inferredParser` might be overridden for a subset of files.
|
||||
|
||||
Reference in new issue
Block a user