@jsse/eslint-config 0.8.2 → 0.8.4

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @jsse/eslint-config
2
2
 
3
+ ## 0.8.4
4
+
5
+ ### Patch Changes
6
+
7
+ - add e18e
8
+
9
+ ## 0.8.3
10
+
11
+ ### Patch Changes
12
+
13
+ - update deps and clean more shit out
14
+
3
15
  ## 0.8.2
4
16
 
5
17
  ### Patch Changes
package/dist/cli.js CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import { r as VERSION, t as DEBUG } from "./const-Bzz9-PXu.js";
2
+ import { r as VERSION, t as DEBUG } from "./const-D_tT7WuW.js";
3
3
  import process from "node:process";
4
4
  import fs from "node:fs";
5
5
  import path from "node:path";
6
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/internal/annotations.js
6
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/internal/annotations.js
7
7
  /**
8
8
  * Runtime context extension system for Optique parsers.
9
9
  *
@@ -269,7 +269,7 @@ function isInjectedAnnotationWrapper(value) {
269
269
  return value != null && typeof value === "object" && (injectedAnnotationWrappers.has(value) || hasInjectedAnnotationWrapperShape(value));
270
270
  }
271
271
  //#endregion
272
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/displaywidth.js
272
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/displaywidth.js
273
273
  const ansiRegex = /\x1B(?:\[[0-9;:]*[@-~]|\][^\x1B\x07]*(?:\x1B\\|\x07))/g;
274
274
  const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
275
275
  /**
@@ -310,7 +310,7 @@ function isEastAsianWide(cp) {
310
310
  return cp >= 4352 && cp <= 4447 || cp >= 9001 && cp <= 9002 || cp >= 9776 && cp <= 9783 || cp >= 9866 && cp <= 9871 || cp >= 11904 && cp <= 12255 || cp >= 12272 && cp <= 12350 || cp >= 12353 && cp <= 40959 || cp >= 40960 && cp <= 42191 || cp >= 43360 && cp <= 43391 || cp >= 44032 && cp <= 55215 || cp >= 63744 && cp <= 64255 || cp >= 65040 && cp <= 65049 || cp >= 65072 && cp <= 65135 || cp >= 65281 && cp <= 65376 || cp >= 65504 && cp <= 65510 || cp >= 94176 && cp <= 101759 || cp >= 110576 && cp <= 111359 || cp >= 127488 && cp <= 127490 || cp >= 127504 && cp <= 127547 || cp >= 127552 && cp <= 127560 || cp >= 127568 && cp <= 127569 || cp >= 127584 && cp <= 127589 || cp >= 131072 && cp <= 196605 || cp >= 196608 && cp <= 262141;
311
311
  }
312
312
  //#endregion
313
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/message.js
313
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/message.js
314
314
  /**
315
315
  * Creates a deep clone of a {@link MessageTerm}. Most variants contain only
316
316
  * primitive fields and are cloned via object spread. The `url` variant
@@ -695,7 +695,7 @@ function formatMessage(msg, options = {}) {
695
695
  return output;
696
696
  }
697
697
  //#endregion
698
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/validate.js
698
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/validate.js
699
699
  /**
700
700
  * Matches Unicode control characters: C0 (U+0000–U+001F), DEL (U+007F),
701
701
  * C1 (U+0080–U+009F), and line separators (U+2028, U+2029).
@@ -857,7 +857,7 @@ function validateContextIds(contexts) {
857
857
  }
858
858
  }
859
859
  //#endregion
860
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/usage.js
860
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/usage.js
861
861
  /**
862
862
  * Returns whether the term should be hidden from usage output.
863
863
  */
@@ -1437,7 +1437,7 @@ function* formatUsageTermInternal(term, options) {
1437
1437
  } else throw new TypeError(`Unknown usage term type: ${term["type"]}.`);
1438
1438
  }
1439
1439
  //#endregion
1440
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/doc.js
1440
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/doc.js
1441
1441
  /**
1442
1442
  * Returns whether a doc entry's term is hidden from documentation.
1443
1443
  * Only term types with a `hidden` field (argument, option, command,
@@ -1946,7 +1946,7 @@ function lastLineVisibleLength(text$1) {
1946
1946
  return getDisplayWidth(lastNewline === -1 ? text$1 : text$1.slice(lastNewline + 1));
1947
1947
  }
1948
1948
  //#endregion
1949
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/internal/mode-dispatch.js
1949
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/internal/mode-dispatch.js
1950
1950
  /**
1951
1951
  * Dispatches to sync or async implementation based on mode.
1952
1952
  *
@@ -1998,7 +1998,7 @@ function dispatchIterableByMode(mode, syncFn, asyncFn) {
1998
1998
  return syncFn();
1999
1999
  }
2000
2000
  //#endregion
2001
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/internal/dependency.js
2001
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/internal/dependency.js
2002
2002
  /**
2003
2003
  * A unique symbol used to identify dependency sources at compile time.
2004
2004
  * This marker is used to distinguish {@link DependencySource} from regular
@@ -2198,7 +2198,7 @@ function isWrappedDependencySource(parser) {
2198
2198
  return typeof parser === "object" && parser !== null && wrappedDependencySourceMarker in parser;
2199
2199
  }
2200
2200
  //#endregion
2201
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/input-trace.js
2201
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/input-trace.js
2202
2202
  const symbolKeys = /* @__PURE__ */ new WeakMap();
2203
2203
  let symbolCounter$1 = 0;
2204
2204
  /** Length-prefix a raw segment so that no delimiter escaping is needed. */
@@ -2251,7 +2251,7 @@ function createInputTrace() {
2251
2251
  return new InputTraceImpl();
2252
2252
  }
2253
2253
  //#endregion
2254
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/internal/parser.js
2254
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/internal/parser.js
2255
2255
  /**
2256
2256
  * Internal marker for wrappers whose `{ hasCliValue: false }` states should
2257
2257
  * be treated as unmatched dependency-source states during completion-time
@@ -2613,7 +2613,7 @@ function buildDocPage(parser, context, args, matchedCommandArgIndices) {
2613
2613
  };
2614
2614
  }
2615
2615
  //#endregion
2616
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/dependency-runtime.js
2616
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/dependency-runtime.js
2617
2617
  const symbolIds = /* @__PURE__ */ new WeakMap();
2618
2618
  let symbolCounter = 0;
2619
2619
  function stableSymbolKey(sym) {
@@ -3180,7 +3180,7 @@ function buildRuntimeNodesFromPairs(pairs, state, parentPath) {
3180
3180
  return nodes;
3181
3181
  }
3182
3182
  //#endregion
3183
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/annotation-state.js
3183
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/annotation-state.js
3184
3184
  /**
3185
3185
  * Shared targets for annotation-view proxies.
3186
3186
  *
@@ -3589,7 +3589,7 @@ function reconcileObjectChildState(parentState, childState) {
3589
3589
  return inheritAnnotations(parentState, childState);
3590
3590
  }
3591
3591
  //#endregion
3592
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/internal/command-alias.js
3592
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/internal/command-alias.js
3593
3593
  /**
3594
3594
  * Internal key used to bypass duplicate leading command name validation when
3595
3595
  * composing built-in meta commands with user parsers.
@@ -3601,7 +3601,7 @@ const allowDuplicateLeadingCommandNamesKey = Symbol("allowDuplicateLeadingComman
3601
3601
  */
3602
3602
  const hiddenCommandAliasesKey = Symbol("hiddenCommandAliases");
3603
3603
  //#endregion
3604
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/execution-context.js
3604
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/execution-context.js
3605
3605
  /**
3606
3606
  * Appends a child parser segment to the current execution path.
3607
3607
  * @internal
@@ -3652,7 +3652,7 @@ function withChildContext(context, segment, state, usage) {
3652
3652
  };
3653
3653
  }
3654
3654
  //#endregion
3655
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/phase2-seed.js
3655
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/phase2-seed.js
3656
3656
  /**
3657
3657
  * Internal parser hook key for phase-two seed extraction.
3658
3658
  *
@@ -3703,7 +3703,7 @@ function completeOrExtractPhase2Seed(parser, state, exec) {
3703
3703
  });
3704
3704
  }
3705
3705
  //#endregion
3706
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/suggestion.js
3706
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/suggestion.js
3707
3707
  /**
3708
3708
  * Calculates the Levenshtein distance between two strings.
3709
3709
  *
@@ -4013,7 +4013,7 @@ function deduplicateSuggestions(suggestions) {
4013
4013
  return order.map((key) => entries.get(key));
4014
4014
  }
4015
4015
  //#endregion
4016
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/usage-internals.js
4016
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/usage-internals.js
4017
4017
  /**
4018
4018
  * Collects option names and command names that are valid as the *immediate*
4019
4019
  * next token at the current parse position ("leading candidates").
@@ -4090,7 +4090,7 @@ function extractLeadingCommandNames(usage) {
4090
4090
  return commands;
4091
4091
  }
4092
4092
  //#endregion
4093
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/constructs.js
4093
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/constructs.js
4094
4094
  /**
4095
4095
  * A shared empty set used as the `leadingNames` value for parsers that
4096
4096
  * do not match any specific name at the first buffer position.
@@ -7057,7 +7057,7 @@ function group(label, parser, options = {}) {
7057
7057
  return groupParser;
7058
7058
  }
7059
7059
  //#endregion
7060
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/dependency-metadata.js
7060
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/dependency-metadata.js
7061
7061
  /**
7062
7062
  * Extracts {@link ParserDependencyMetadata} from a value parser by reading
7063
7063
  * old-protocol markers (`dependencySourceMarker`, `derivedValueParserMarker`,
@@ -7186,7 +7186,7 @@ function composeDependencyMetadata(inner, wrapperKind, options) {
7186
7186
  }
7187
7187
  }
7188
7188
  //#endregion
7189
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/modifiers.js
7189
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/modifiers.js
7190
7190
  function isTerminalMultipleItemState(state) {
7191
7191
  const unwrapped = unwrapMultipleItemState(state).value;
7192
7192
  return unwrapped != null && typeof unwrapped === "object" && Object.hasOwn(unwrapped, "success") && typeof unwrapped.success === "boolean";
@@ -8438,7 +8438,7 @@ function multiple(parser, options = {}) {
8438
8438
  return resultParser;
8439
8439
  }
8440
8440
  //#endregion
8441
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/nonempty.js
8441
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/nonempty.js
8442
8442
  /**
8443
8443
  * Asserts that a string is non-empty.
8444
8444
  * Throws a `TypeError` if the string is empty.
@@ -8450,7 +8450,7 @@ function ensureNonEmptyString(value) {
8450
8450
  if (value === "") throw new TypeError("Expected a non-empty string.");
8451
8451
  }
8452
8452
  //#endregion
8453
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/valueparser.js
8453
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/valueparser.js
8454
8454
  /**
8455
8455
  * A predicate function that checks if an object is a {@link ValueParser}.
8456
8456
  * @param object The object to check.
@@ -8531,7 +8531,7 @@ const SEMVER_SUGGESTIONS = Object.freeze([
8531
8531
  ]);
8532
8532
  Object.freeze([...SEMVER_SUGGESTIONS, ...SEMVER_SUGGESTIONS.map((s) => `v${s}`)]);
8533
8533
  //#endregion
8534
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/primitives.js
8534
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/primitives.js
8535
8535
  /**
8536
8536
  * A shared empty set used as the `leadingNames` value for parsers that
8537
8537
  * do not match any specific name at the first buffer position.
@@ -9926,7 +9926,7 @@ function command(name, parser, options = {}) {
9926
9926
  return result;
9927
9927
  }
9928
9928
  //#endregion
9929
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/completion.js
9929
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/completion.js
9930
9930
  /**
9931
9931
  * A regular expression pattern for valid program names that can be safely
9932
9932
  * interpolated into shell scripts.
@@ -11218,7 +11218,7 @@ ${escapedArgs ? ` \$completionArgs += @(${escapedArgs})
11218
11218
  }
11219
11219
  };
11220
11220
  //#endregion
11221
- //#region node_modules/.pnpm/@optique+core@1.1.0/node_modules/@optique/core/dist/facade.js
11221
+ //#region node_modules/.pnpm/@optique+core@1.1.1/node_modules/@optique/core/dist/facade.js
11222
11222
  /**
11223
11223
  * Combines built-in meta commands while intentionally bypassing duplicate
11224
11224
  * leading command name validation in `createLongestMatch()`.
@@ -12240,6 +12240,7 @@ function runParser(parserOrProgram, programNameOrArgs, argsOrOptions, optionsPar
12240
12240
  ], programName, parser, classified.source === "command" ? completionParsers.completionCommand : completionParsers.completionOption, stdout, stderr, onCompletionResult, onErrorResult, availableShells, colors, maxWidth, completionCommandNames[0], completionOptionNames[0], classified.source === "option", sectionOrder, rootOptionSuggestions);
12241
12241
  case "help": {
12242
12242
  let helpGeneratorParser;
12243
+ let docGeneratorParser;
12243
12244
  const helpAsCommand = helpCommandConfig != null;
12244
12245
  const versionAsCommand = versionCommandConfig != null;
12245
12246
  const completionAsCommand = completionCommandConfig != null;
@@ -12247,10 +12248,16 @@ function runParser(parserOrProgram, programNameOrArgs, argsOrOptions, optionsPar
12247
12248
  const versionAsOption = versionOptionConfig != null;
12248
12249
  const completionAsOption = completionOptionConfig != null;
12249
12250
  const requestedCommand = classified.commands[0];
12250
- if (requestedCommand != null && !classified.preferUserCommandDocs && completionCommandNames.includes(requestedCommand) && completionAsCommand && completionParsers.completionCommand) helpGeneratorParser = completionParsers.completionCommand;
12251
- else if (requestedCommand != null && !classified.preferUserCommandDocs && helpCommandNames.includes(requestedCommand) && helpAsCommand && helpParsers.helpCommand) helpGeneratorParser = helpParsers.helpCommand;
12252
- else if (requestedCommand != null && !classified.preferUserCommandDocs && versionCommandNames.includes(requestedCommand) && versionAsCommand && versionParsers.versionCommand) helpGeneratorParser = versionParsers.versionCommand;
12253
- else {
12251
+ if (requestedCommand != null && !classified.preferUserCommandDocs && completionCommandNames.includes(requestedCommand) && completionAsCommand && completionParsers.completionCommand) {
12252
+ helpGeneratorParser = completionParsers.completionCommand;
12253
+ docGeneratorParser = helpGeneratorParser;
12254
+ } else if (requestedCommand != null && !classified.preferUserCommandDocs && helpCommandNames.includes(requestedCommand) && helpAsCommand && helpParsers.helpCommand) {
12255
+ helpGeneratorParser = helpParsers.helpCommand;
12256
+ docGeneratorParser = helpGeneratorParser;
12257
+ } else if (requestedCommand != null && !classified.preferUserCommandDocs && versionCommandNames.includes(requestedCommand) && versionAsCommand && versionParsers.versionCommand) {
12258
+ helpGeneratorParser = versionParsers.versionCommand;
12259
+ docGeneratorParser = helpGeneratorParser;
12260
+ } else {
12254
12261
  const commandParsers = [parser];
12255
12262
  const groupedMeta = {};
12256
12263
  const ungroupedMeta = [];
@@ -12278,6 +12285,7 @@ function runParser(parserOrProgram, programNameOrArgs, argsOrOptions, optionsPar
12278
12285
  else commandParsers.push(group(label, longestMatch(...optParsers)));
12279
12286
  if (commandParsers.length === 1) helpGeneratorParser = commandParsers[0];
12280
12287
  else helpGeneratorParser = longestMatchForMetaCommands(...commandParsers);
12288
+ docGeneratorParser = classified.commands.length > 0 ? parser : helpGeneratorParser;
12281
12289
  }
12282
12290
  const reportInvalidHelpCommand = (validationError) => {
12283
12291
  stderr(`Usage: ${indentLines(formatUsage(programName, augmentedParser.usage, {
@@ -12346,7 +12354,7 @@ function runParser(parserOrProgram, programNameOrArgs, argsOrOptions, optionsPar
12346
12354
  res = processStep(next instanceof Promise ? await next : next);
12347
12355
  }
12348
12356
  if (res != null) return reportInvalidHelpCommand(res);
12349
- const docOrPromise$1 = getDocPage(helpGeneratorParser, classified.commands);
12357
+ const docOrPromise$1 = getDocPage(docGeneratorParser, classified.commands);
12350
12358
  return docOrPromise$1 instanceof Promise ? docOrPromise$1.then(displayHelp) : displayHelp(docOrPromise$1);
12351
12359
  };
12352
12360
  return stepResult.then(asyncValidate);
@@ -12355,7 +12363,7 @@ function runParser(parserOrProgram, programNameOrArgs, argsOrOptions, optionsPar
12355
12363
  }
12356
12364
  if (validationResult != null) return reportInvalidHelpCommand(validationResult);
12357
12365
  }
12358
- const docOrPromise = getDocPage(helpGeneratorParser, classified.commands);
12366
+ const docOrPromise = getDocPage(docGeneratorParser, classified.commands);
12359
12367
  if (docOrPromise instanceof Promise) return docOrPromise.then(displayHelp);
12360
12368
  return displayHelp(docOrPromise);
12361
12369
  }
@@ -12709,7 +12717,7 @@ function injectAnnotationsIntoParser(parser, annotations) {
12709
12717
  return Object.create(Object.getPrototypeOf(parser), descriptors);
12710
12718
  }
12711
12719
  //#endregion
12712
- //#region node_modules/.pnpm/@optique+run@1.1.0/node_modules/@optique/run/dist/run.js
12720
+ //#region node_modules/.pnpm/@optique+run@1.1.1/node_modules/@optique/run/dist/run.js
12713
12721
  function getProgramHelpMetadata(metadata) {
12714
12722
  return {
12715
12723
  brief: metadata.brief,
@@ -12912,11 +12920,17 @@ export default jsse(
12912
12920
  }
12913
12921
  );
12914
12922
  `;
12915
- const PARSER = merge(object({ debug: option("-d", "--debug", { description: message`Print parsed command options.` }) }), or(command("init", object({
12923
+ const ROOT_OPTIONS = object({ debug: option("-d", "--debug", { description: message`Print parsed command options.` }) });
12924
+ const INIT_COMMAND = command("init", object({
12916
12925
  action: constant("init"),
12917
12926
  filepath: optional(option("-p", "--filepath", string({ metavar: "FILEPATH" }), { description: message`Path to the ESLint config file to create.` })),
12918
12927
  force: option("-f", "--force", { description: message`Overwrite an existing ESLint config file.` })
12919
- }), { brief: message`Create an ESLint config file.` })));
12928
+ }), { brief: message`Create an ESLint config file.` });
12929
+ const DEV_COMMAND = command("dev", object({ action: constant("dev") }), { brief: message`cli-dev` });
12930
+ function clidev() {
12931
+ console.log("cli-dev");
12932
+ }
12933
+ const PARSER = merge(ROOT_OPTIONS, or(INIT_COMMAND, DEV_COMMAND));
12920
12934
  function writeInitConfig(options) {
12921
12935
  console.log("init");
12922
12936
  if (!fs.existsSync("package.json")) {
@@ -12955,6 +12969,9 @@ async function main() {
12955
12969
  case "init":
12956
12970
  writeInitConfig(parsed);
12957
12971
  break;
12972
+ case "dev":
12973
+ clidev();
12974
+ break;
12958
12975
  }
12959
12976
  } catch (error) {
12960
12977
  if (error instanceof Error) console.error("Error: %s\n\n%s", error.message, error.stack);
@@ -1,6 +1,6 @@
1
1
  import process from "node:process";
2
2
  //#region src/_generated/version.ts
3
- const VERSION = "0.8.2";
3
+ const VERSION = "0.8.4";
4
4
  //#endregion
5
5
  //#region src/const.ts
6
6
  /**