Use meriyah (#9731)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
This commit is contained in:
1 parent
c5e3eb6fab
commit
f254314feb
6 files changed
+17
-9
No files matched your search
+7
-1
@@ -1 +1,7 @@
|
||||
{}
|
||||
overrides:
|
||||
- files: "**/*.{js,mjs}"
|
||||
options:
|
||||
parser: meriyah
|
||||
- files: ".prettierrc"
|
||||
options:
|
||||
parser: yaml
|
||||
+2
-1
@@ -918,6 +918,7 @@ function createDetailedOptionMap(supportOptions) {
|
||||
|
||||
/** @returns {Context} */
|
||||
function createContext(args) {
|
||||
/** @type {Context} */
|
||||
const context = { args, stack: [] };
|
||||
|
||||
updateContextArgv(context);
|
||||
@@ -931,7 +932,7 @@ function createContext(args) {
|
||||
context.argv["plugin-search-dir"]
|
||||
);
|
||||
|
||||
return /** @type {Context} */ (context);
|
||||
return context;
|
||||
}
|
||||
|
||||
function initContext(context) {
|
||||
|
||||
+4
-5
@@ -56,11 +56,10 @@ module.exports = {
|
||||
plugins.clearCache();
|
||||
},
|
||||
|
||||
getFileInfo: /** @type {typeof getFileInfo} */ (withPlugins(getFileInfo)),
|
||||
getSupportInfo: /** @type {typeof getSupportInfo} */ (withPlugins(
|
||||
getSupportInfo,
|
||||
0
|
||||
)),
|
||||
/** @type {typeof getFileInfo} */
|
||||
getFileInfo: withPlugins(getFileInfo),
|
||||
/** @type {typeof getSupportInfo} */
|
||||
getSupportInfo: withPlugins(getSupportInfo, 0),
|
||||
|
||||
version,
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{}
|
||||
@@ -0,0 +1 @@
|
||||
{}
|
||||
@@ -84,7 +84,7 @@ function runPrettier(dir, args, options) {
|
||||
.mockImplementation((moduleName, options) =>
|
||||
require("cosmiconfig").cosmiconfig(moduleName, {
|
||||
...options,
|
||||
stopDir: __dirname,
|
||||
stopDir: path.join(__dirname, "cli"),
|
||||
})
|
||||
);
|
||||
jest
|
||||
@@ -92,7 +92,7 @@ function runPrettier(dir, args, options) {
|
||||
.mockImplementation((moduleName, options) =>
|
||||
require("cosmiconfig").cosmiconfigSync(moduleName, {
|
||||
...options,
|
||||
stopDir: __dirname,
|
||||
stopDir: path.join(__dirname, "cli"),
|
||||
})
|
||||
);
|
||||
jest
|
||||
|
||||
Reference in new issue
Block a user