Skip to content

Commit 9f6de63

Browse files
Try to revert unwanted changes
1 parent ba269a7 commit 9f6de63

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

flow-typed/npm/@swc/core_v1.x.x.js

+15-15
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ declare module '@swc/core' {
293293
* presence of the filename.
294294
* - Options like "test", "exclude", and "ignore" require the filename
295295
* for string/RegExp matching.
296-
* - swc.config.js files are loaded relative to the file being compiled.
296+
* - .swcrc files are loaded relative to the file being compiled.
297297
* If this option is omitted, Swc will behave as if swcrc: false has been set.
298298
*/
299299
filename?: string,
@@ -317,27 +317,27 @@ declare module '@swc/core' {
317317
*
318318
* "root" - Passes the "root" value through as unchanged.
319319
* "upward" - Walks upward from the "root" directory, looking for a directory
320-
* containing a swc.config.js file, and throws an error if a swc.config.js
320+
* containing a .swcrc file, and throws an error if a .swcrc
321321
* is not found.
322322
* "upward-optional" - Walk upward from the "root" directory, looking for
323-
* a directory containing a swc.config.js file, and falls back to "root"
324-
* if a swc.config.js is not found.
323+
* a directory containing a .swcrc file, and falls back to "root"
324+
* if a .swcrc is not found.
325325
*
326326
*
327327
* "root" is the default mode because it avoids the risk that Swc
328-
* will accidentally load a swc.config.js that is entirely outside
328+
* will accidentally load a .swcrc that is entirely outside
329329
* of the current project folder. If you use "upward-optional",
330330
* be aware that it will walk up the directory structure all the
331331
* way to the filesystem root, and it is always possible that someone
332-
* will have a forgotten swc.config.js in their home directory,
332+
* will have a forgotten .swcrc in their home directory,
333333
* which could cause unexpected errors in your builds.
334334
*
335335
*
336336
* Users with monorepo project structures that run builds/tests on a
337337
* per-package basis may well want to use "upward" since monorepos
338-
* often have a swc.config.js in the project root. Running Swc
338+
* often have a .swcrc in the project root. Running Swc
339339
* in a monorepo subdirectory without "upward", will cause Swc
340-
* to skip loading any swc.config.js files in the project root,
340+
* to skip loading any .swcrc files in the project root,
341341
* which can lead to unexpected errors and compilation failure.
342342
*/
343343
rootMode?: 'root' | 'upward' | 'upward-optional',
@@ -353,19 +353,19 @@ declare module '@swc/core' {
353353
envName?: string,
354354

355355
/**
356-
* Defaults to searching for a default `swc.config.js` file, but can
356+
* Defaults to searching for a default `.swcrc` file, but can
357357
* be passed the path of any JS or JSON5 config file.
358358
*
359359
*
360-
* NOTE: This option does not affect loading of swc.config.js files,
361-
* so while it may be tempting to do configFile: "./foo/swc.config.js",
362-
* it is not recommended. If the given swc.config.js is loaded via the
360+
* NOTE: This option does not affect loading of .swcrc files,
361+
* so while it may be tempting to do configFile: "./foo/.swcrc",
362+
* it is not recommended. If the given .swcrc is loaded via the
363363
* standard file-relative logic, you'll end up loading the same
364364
* config file twice, merging it with itself. If you are linking
365365
* a specific config file, it is recommended to stick with a
366366
* naming scheme that is independent of the "swcrc" name.
367367
*
368-
* Defaults to `path.resolve(opts.root, "swc.config.js")`
368+
* Defaults to `path.resolve(opts.root, ".swcrc")`
369369
*/
370370
configFile?: string | boolean,
371371

@@ -374,7 +374,7 @@ declare module '@swc/core' {
374374
*
375375
* A swcrc value passed in the programmatic options will override one set within a configuration file.
376376
*
377-
* Note: swc.config.js files are only loaded if the current "filename" is inside of
377+
* Note: .swcrc files are only loaded if the current "filename" is inside of
378378
* a package that matches one of the "swcrcRoots" packages.
379379
*
380380
*
@@ -494,7 +494,7 @@ declare module '@swc/core' {
494494
|};
495495
declare export type Swcrc = Config | Config[];
496496
/**
497-
* swc.config.js
497+
* .swcrc
498498
*/
499499
declare export type Config = {|
500500
/**

0 commit comments

Comments
 (0)