Use meriyah (#9731)

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
This commit is contained in:
fisker CheungandGeorgii Dolzhykov authored and GitHub committed 2020-11-23 13:57:13 +08:00
1 parent c5e3eb6fab
commit f254314feb
6 files changed
+17 -9

No files matched your search

+7 -1
View File
@@ -1 +1,7 @@
{}
overrides:
- files: "**/*.{js,mjs}"
options:
parser: meriyah
- files: ".prettierrc"
options:
parser: yaml
+2 -1
View File
@@ -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
View File
@@ -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,
+1
View File
@@ -0,0 +1 @@
{}
+1
View File
@@ -0,0 +1 @@
{}
+2 -2
View File
@@ -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