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} */ /** @returns {Context} */
function createContext(args) { function createContext(args) {
/** @type {Context} */
const context = { args, stack: [] }; const context = { args, stack: [] };
updateContextArgv(context); updateContextArgv(context);
@@ -931,7 +932,7 @@ function createContext(args) {
context.argv["plugin-search-dir"] context.argv["plugin-search-dir"]
); );
return /** @type {Context} */ (context); return context;
} }
function initContext(context) { function initContext(context) {
+4 -5
View File
@@ -56,11 +56,10 @@ module.exports = {
plugins.clearCache(); plugins.clearCache();
}, },
getFileInfo: /** @type {typeof getFileInfo} */ (withPlugins(getFileInfo)), /** @type {typeof getFileInfo} */
getSupportInfo: /** @type {typeof getSupportInfo} */ (withPlugins( getFileInfo: withPlugins(getFileInfo),
getSupportInfo, /** @type {typeof getSupportInfo} */
0 getSupportInfo: withPlugins(getSupportInfo, 0),
)),
version, 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) => .mockImplementation((moduleName, options) =>
require("cosmiconfig").cosmiconfig(moduleName, { require("cosmiconfig").cosmiconfig(moduleName, {
...options, ...options,
stopDir: __dirname, stopDir: path.join(__dirname, "cli"),
}) })
); );
jest jest
@@ -92,7 +92,7 @@ function runPrettier(dir, args, options) {
.mockImplementation((moduleName, options) => .mockImplementation((moduleName, options) =>
require("cosmiconfig").cosmiconfigSync(moduleName, { require("cosmiconfig").cosmiconfigSync(moduleName, {
...options, ...options,
stopDir: __dirname, stopDir: path.join(__dirname, "cli"),
}) })
); );
jest jest