@ariel-salgado/eslint-config 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +0 -8
- package/dist/index.mjs +5 -12
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -17662,14 +17662,6 @@ declare function interop_default<T>(m: Awaitable<T>): Promise<T extends {
|
|
|
17662
17662
|
} ? U : T>;
|
|
17663
17663
|
declare function is_package_in_scope(name: string): boolean;
|
|
17664
17664
|
declare function ensure_packages(packages: (string | undefined)[]): Promise<void>;
|
|
17665
|
-
/**
|
|
17666
|
-
* Expand a single cwd pattern to concrete directory paths.
|
|
17667
|
-
*
|
|
17668
|
-
* Patterns containing `*` (e.g. `apps/*`, `./packages/**`) are expanded by
|
|
17669
|
-
* listing all immediate subdirectories of the base segment that precedes the
|
|
17670
|
-
* first `*`. This mirrors the monorepo convention where every direct child of
|
|
17671
|
-
* `apps/` or `packages/` is an independent project.
|
|
17672
|
-
*/
|
|
17673
17665
|
declare function expand_cwd_globs(pattern: string): string[];
|
|
17674
17666
|
/**
|
|
17675
17667
|
* Normalise a `cwd` value (string or array, with optional glob patterns) to a
|
package/dist/index.mjs
CHANGED
|
@@ -16,6 +16,7 @@ import { findUp } from "find-up-simple";
|
|
|
16
16
|
import { isPackageExists } from "local-pkg";
|
|
17
17
|
import globals from "globals";
|
|
18
18
|
import { readdirSync } from "node:fs";
|
|
19
|
+
import { posix } from "node:path";
|
|
19
20
|
import { createInterface } from "node:readline";
|
|
20
21
|
import { isatty } from "node:tty";
|
|
21
22
|
import { fileURLToPath } from "node:url";
|
|
@@ -578,20 +579,12 @@ async function ensure_packages(packages) {
|
|
|
578
579
|
process.stderr.write(`\n[eslint-config] Could not prompt for missing packages. Install manually: ${non_existing.join(", ")}\n\n`);
|
|
579
580
|
}
|
|
580
581
|
}
|
|
581
|
-
/**
|
|
582
|
-
* Expand a single cwd pattern to concrete directory paths.
|
|
583
|
-
*
|
|
584
|
-
* Patterns containing `*` (e.g. `apps/*`, `./packages/**`) are expanded by
|
|
585
|
-
* listing all immediate subdirectories of the base segment that precedes the
|
|
586
|
-
* first `*`. This mirrors the monorepo convention where every direct child of
|
|
587
|
-
* `apps/` or `packages/` is an independent project.
|
|
588
|
-
*/
|
|
589
582
|
function expand_cwd_globs(pattern) {
|
|
590
|
-
const
|
|
591
|
-
if (!
|
|
592
|
-
const base =
|
|
583
|
+
const normalized = pattern.replace(/\\/g, "/");
|
|
584
|
+
if (!normalized.includes("*")) return [normalized];
|
|
585
|
+
const base = normalized.slice(0, normalized.indexOf("*")).replace(/\/$/, "") || ".";
|
|
593
586
|
try {
|
|
594
|
-
return readdirSync(base, { withFileTypes: true }).filter((
|
|
587
|
+
return readdirSync(base, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => `./${posix.join(base, entry.name)}/`.replace(/^\.\/\.\//, "./"));
|
|
595
588
|
} catch {
|
|
596
589
|
return [];
|
|
597
590
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ariel-salgado/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.5",
|
|
5
5
|
"description": "Eslint config for @ariel-salgado.",
|
|
6
6
|
"author": "Ariel Salgado <ariel.salgado.acevedo@gmail.com> (https://github.com/ariel-salgado/)",
|
|
7
7
|
"license": "MIT",
|