@jsse/eslint-config 0.8.2 → 0.8.3
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/CHANGELOG.md +6 -0
- package/dist/cli.js +12 -3
- package/dist/{const-Bzz9-PXu.js → const-BGD6_tOf.js} +1 -1
- package/dist/index.d.ts +381 -315
- package/dist/index.js +106 -25
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +9 -7
package/CHANGELOG.md
CHANGED
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { r as VERSION, t as DEBUG } from "./const-
|
|
2
|
+
import { r as VERSION, t as DEBUG } from "./const-BGD6_tOf.js";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import path from "node:path";
|
|
@@ -12912,11 +12912,17 @@ export default jsse(
|
|
|
12912
12912
|
}
|
|
12913
12913
|
);
|
|
12914
12914
|
`;
|
|
12915
|
-
const
|
|
12915
|
+
const ROOT_OPTIONS = object({ debug: option("-d", "--debug", { description: message`Print parsed command options.` }) });
|
|
12916
|
+
const INIT_COMMAND = command("init", object({
|
|
12916
12917
|
action: constant("init"),
|
|
12917
12918
|
filepath: optional(option("-p", "--filepath", string({ metavar: "FILEPATH" }), { description: message`Path to the ESLint config file to create.` })),
|
|
12918
12919
|
force: option("-f", "--force", { description: message`Overwrite an existing ESLint config file.` })
|
|
12919
|
-
}), { brief: message`Create an ESLint config file.` })
|
|
12920
|
+
}), { brief: message`Create an ESLint config file.` });
|
|
12921
|
+
const DEV_COMMAND = command("dev", object({ action: constant("dev") }), { brief: message`cli-dev` });
|
|
12922
|
+
function clidev() {
|
|
12923
|
+
console.log("cli-dev");
|
|
12924
|
+
}
|
|
12925
|
+
const PARSER = merge(ROOT_OPTIONS, or(INIT_COMMAND, DEV_COMMAND));
|
|
12920
12926
|
function writeInitConfig(options) {
|
|
12921
12927
|
console.log("init");
|
|
12922
12928
|
if (!fs.existsSync("package.json")) {
|
|
@@ -12955,6 +12961,9 @@ async function main() {
|
|
|
12955
12961
|
case "init":
|
|
12956
12962
|
writeInitConfig(parsed);
|
|
12957
12963
|
break;
|
|
12964
|
+
case "dev":
|
|
12965
|
+
clidev();
|
|
12966
|
+
break;
|
|
12958
12967
|
}
|
|
12959
12968
|
} catch (error) {
|
|
12960
12969
|
if (error instanceof Error) console.error("Error: %s\n\n%s", error.message, error.stack);
|