eslint-cli-bundle 1.0.5 → 2.0.1

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.
@@ -1,4 +1,4 @@
1
- //#region node_modules/@types/json-schema/index.d.ts
1
+ //#region node_modules/.pnpm/@types+json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts
2
2
  // ==================================================================================================
3
3
  // JSON Schema Draft 04
4
4
  // ==================================================================================================
@@ -6,12 +6,12 @@
6
6
  * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
7
7
  */
8
8
  type JSONSchema4TypeName = "string" //
9
- | "number" | "integer" | "boolean" | "object" | "array" | "null" | "any";
9
+ | "number" | "integer" | "boolean" | "object" | "array" | "null" | "any";
10
10
  /**
11
11
  * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5
12
12
  */
13
13
  type JSONSchema4Type = string //
14
- | number | boolean | JSONSchema4Object | JSONSchema4Array | null;
14
+ | number | boolean | JSONSchema4Object | JSONSchema4Array | null;
15
15
  // Workaround for infinite type recursion
16
16
  interface JSONSchema4Object {
17
17
  [key: string]: JSONSchema4Type;
@@ -196,8 +196,9 @@ interface JSONSchema4 {
196
196
  [k: string]: any;
197
197
  format?: string | undefined;
198
198
  }
199
- //#endregion
200
- //#region node_modules/@eslint/core/dist/esm/types.d.ts
199
+ declare namespace types_d_exports {
200
+ export { BaseConfig, BinarySourceCode, CallTraversalStep, ConfigObject, ConfigOverride, CustomRuleDefinitionType, CustomRuleTypeDefinitions, DeprecatedInfo, Directive, DirectiveType, EcmaVersion, EnvironmentConfig, ExternalSpecifier, File, FileError, FileProblem, GlobalAccess, GlobalsConfig, HasRules, JavaScriptParserOptionsConfig, JavaScriptSourceType, Language, LanguageContext, LanguageOptions, LanguageTypeOptions, LegacyConfigObject, LintMessage, LintSuggestion, LinterOptionsConfig, MessagePlaceholderData, NotOkParseResult, ObjectMetaProperties, OkParseResult, ParseResult, Plugin, Position, PositionWithOffset, Processor, ProcessorFile, ReplacedByInfo, RuleConfig, RuleContext, RuleContextTypeOptions, RuleDefinition, RuleDefinitionTypeOptions, RuleFixType, RuleFixer, RuleTextEdit, RuleTextEditor, RuleType, RuleVisitor, RulesConfig, RulesMeta, RulesMetaDocs, SettingsConfig, Severity, SeverityLevel, SeverityName, SourceCode, SourceCodeBaseTypeOptions, SourceLocation, SourceLocationWithOffset, SourceRange, SuggestedEdit, SuggestedEditBase, SuggestionMessage, TextSourceCode, TraversalStep, ViolationLocation, ViolationMessage, ViolationReport, ViolationReportBase, VisitTraversalStep };
201
+ }
201
202
  /**
202
203
  * Represents an error inside of a file.
203
204
  */
@@ -223,6 +224,13 @@ interface SourceLocation {
223
224
  start: Position;
224
225
  end: Position;
225
226
  }
227
+ /**
228
+ * Represents the start and end coordinates of a node inside the source with an offset.
229
+ */
230
+ interface SourceLocationWithOffset {
231
+ start: PositionWithOffset;
232
+ end: PositionWithOffset;
233
+ }
226
234
  /**
227
235
  * Represents a location coordinate inside the source. ESLint-style formats
228
236
  * have just `line` and `column` while others may have `offset` as well.
@@ -231,6 +239,12 @@ interface Position {
231
239
  line: number;
232
240
  column: number;
233
241
  }
242
+ /**
243
+ * Represents a location coordinate inside the source with an offset.
244
+ */
245
+ interface PositionWithOffset extends Position {
246
+ offset: number;
247
+ }
234
248
  /**
235
249
  * Represents a range of characters in the source.
236
250
  */
@@ -266,11 +280,6 @@ interface RulesMetaDocs {
266
280
  * The URL to the documentation for the rule.
267
281
  */
268
282
  url?: string | undefined;
269
- /**
270
- * The category the rule falls under.
271
- * @deprecated No longer used.
272
- */
273
- category?: string | undefined;
274
283
  /**
275
284
  * Indicates if the rule is generally recommended for all users.
276
285
  *
@@ -281,6 +290,12 @@ interface RulesMetaDocs {
281
290
  * Indicates if the rule is frozen (no longer accepting feature requests).
282
291
  */
283
292
  frozen?: boolean | undefined;
293
+ /**
294
+ * The dialects of the languages that the rule is intended to lint.
295
+ * @example
296
+ * ["JavaScript", "TypeScript"]
297
+ */
298
+ dialects?: string[] | undefined;
284
299
  }
285
300
  /**
286
301
  * Meta information about a rule.
@@ -325,12 +340,21 @@ interface RulesMeta<MessageIds extends string = string, RuleOptions = unknown[],
325
340
  hasSuggestions?: boolean | undefined;
326
341
  /**
327
342
  * The language the rule is intended to lint.
343
+ * @deprecated Use `languages` instead.
328
344
  */
329
345
  language?: string;
330
346
  /**
331
347
  * The dialects of `language` that the rule is intended to lint.
348
+ * @deprecated Use `docs.dialects` instead.
332
349
  */
333
350
  dialects?: string[];
351
+ /**
352
+ * Languages supported by this rule in the format `"plugin/language"`.
353
+ * Use `"*"` for any language or `"plugin/*"` for any language from a specific plugin.
354
+ * @example
355
+ * ["js/js", "markdown/gfm", "json/jsonc", "css/css"]
356
+ */
357
+ languages?: string[] | undefined;
334
358
  }
335
359
  /**
336
360
  * Provides additional metadata about a deprecation.
@@ -417,56 +441,26 @@ interface RuleContext<Options extends RuleContextTypeOptions = RuleContextTypeOp
417
441
  * The current working directory for the session.
418
442
  */
419
443
  cwd: string;
420
- /**
421
- * Returns the current working directory for the session.
422
- * @deprecated Use `cwd` instead.
423
- */
424
- getCwd(): string;
425
444
  /**
426
445
  * The filename of the file being linted.
427
446
  */
428
447
  filename: string;
429
- /**
430
- * Returns the filename of the file being linted.
431
- * @deprecated Use `filename` instead.
432
- */
433
- getFilename(): string;
434
448
  /**
435
449
  * The physical filename of the file being linted.
436
450
  */
437
451
  physicalFilename: string;
438
- /**
439
- * Returns the physical filename of the file being linted.
440
- * @deprecated Use `physicalFilename` instead.
441
- */
442
- getPhysicalFilename(): string;
443
452
  /**
444
453
  * The source code object that the rule is running on.
445
454
  */
446
455
  sourceCode: Options["Code"];
447
- /**
448
- * Returns the source code object that the rule is running on.
449
- * @deprecated Use `sourceCode` instead.
450
- */
451
- getSourceCode(): Options["Code"];
452
456
  /**
453
457
  * Shared settings for the configuration.
454
458
  */
455
459
  settings: SettingsConfig;
456
- /**
457
- * Parser-specific options for the configuration.
458
- * @deprecated Use `languageOptions.parserOptions` instead.
459
- */
460
- parserOptions: Record<string, unknown>;
461
460
  /**
462
461
  * The language options for the configuration.
463
462
  */
464
463
  languageOptions: Options["LangOptions"];
465
- /**
466
- * The CommonJS path to the parser used while parsing this file.
467
- * @deprecated No longer used.
468
- */
469
- parserPath: string | undefined;
470
464
  /**
471
465
  * The rule ID.
472
466
  */
@@ -555,11 +549,15 @@ interface RuleTextEdit {
555
549
  * @returns The fix(es) for the violation.
556
550
  */
557
551
  type RuleFixer = (fixer: RuleTextEditor) => RuleTextEdit | Iterable<RuleTextEdit> | null;
558
- interface ViolationReportBase {
552
+ /**
553
+ * Data that can be used to fill placeholders in error messages.
554
+ */
555
+ type MessagePlaceholderData = Record<string, string | number | boolean | bigint | null | undefined>;
556
+ interface ViolationReportBase<MessageIds extends string = string> {
559
557
  /**
560
558
  * The data to insert into the message.
561
559
  */
562
- data?: Record<string, unknown> | undefined;
560
+ data?: MessagePlaceholderData | undefined;
563
561
  /**
564
562
  * The fix to be applied for the violation.
565
563
  */
@@ -568,9 +566,9 @@ interface ViolationReportBase {
568
566
  * An array of suggested fixes for the problem. These fixes may change the
569
567
  * behavior of the code, so they are not applied automatically.
570
568
  */
571
- suggest?: SuggestedEdit[] | null | undefined;
569
+ suggest?: SuggestedEdit<MessageIds>[] | null | undefined;
572
570
  }
573
- type ViolationMessage<MessageIds = string> = {
571
+ type ViolationMessage<MessageIds extends string = string> = {
574
572
  message: string;
575
573
  } | {
576
574
  messageId: MessageIds;
@@ -580,26 +578,26 @@ type ViolationLocation<Node> = {
580
578
  } | {
581
579
  node: Node;
582
580
  };
583
- type ViolationReport<Node = unknown, MessageIds = string> = ViolationReportBase & ViolationMessage<MessageIds> & ViolationLocation<Node>;
581
+ type ViolationReport<Node = unknown, MessageIds extends string = string> = ViolationReportBase<MessageIds> & ViolationMessage<MessageIds> & ViolationLocation<Node>;
584
582
  interface SuggestedEditBase {
585
583
  /**
586
584
  * The data to insert into the message.
587
585
  */
588
- data?: Record<string, unknown> | undefined;
586
+ data?: MessagePlaceholderData | undefined;
589
587
  /**
590
588
  * The fix to be applied for the suggestion.
591
589
  */
592
590
  fix: RuleFixer;
593
591
  }
594
- type SuggestionMessage = {
592
+ type SuggestionMessage<MessageIds extends string = string> = {
595
593
  desc: string;
596
594
  } | {
597
- messageId: string;
595
+ messageId: MessageIds;
598
596
  };
599
597
  /**
600
598
  * A suggested edit for a rule violation.
601
599
  */
602
- type SuggestedEdit = SuggestedEditBase & SuggestionMessage;
600
+ type SuggestedEdit<MessageIds extends string = string> = SuggestedEditBase & SuggestionMessage<MessageIds>;
603
601
  /**
604
602
  * The normalized version of a lint suggestion.
605
603
  */
@@ -629,11 +627,6 @@ interface LintMessage {
629
627
  message: string;
630
628
  /** The ID of the message in the rule's meta. */
631
629
  messageId?: string | undefined;
632
- /**
633
- * Type of node.
634
- * @deprecated `nodeType` is deprecated and will be removed in the next major version.
635
- */
636
- nodeType?: string | undefined;
637
630
  /** If `true` then this is a fatal error. */
638
631
  fatal?: true | undefined;
639
632
  /** The severity of this message. */
@@ -676,6 +669,35 @@ interface RuleDefinition<Options extends RuleDefinitionTypeOptions = RuleDefinit
676
669
  MessageIds: Options["MessageIds"];
677
670
  }>): Options["Visitor"];
678
671
  }
672
+ /**
673
+ * Defaults for non-language-related `RuleDefinition` options.
674
+ * @deprecated Use the same type from `@eslint/plugin-kit` instead.
675
+ */
676
+ interface CustomRuleTypeDefinitions {
677
+ RuleOptions: unknown[];
678
+ MessageIds: string;
679
+ ExtRuleDocs: Record<string, unknown>;
680
+ }
681
+ /**
682
+ * A helper type to define language specific specializations of the `RuleDefinition` type.
683
+ * @deprecated Use the same type from `@eslint/plugin-kit` instead.
684
+ *
685
+ * @example
686
+ * ```ts
687
+ * type YourRuleDefinition<
688
+ * Options extends Partial<CustomRuleTypeDefinitions> = {},
689
+ * > = CustomRuleDefinitionType<
690
+ * {
691
+ * LangOptions: YourLanguageOptions;
692
+ * Code: YourSourceCode;
693
+ * Visitor: YourRuleVisitor;
694
+ * Node: YourNode;
695
+ * },
696
+ * Options
697
+ * >;
698
+ * ```
699
+ */
700
+ type CustomRuleDefinitionType<LanguageSpecificOptions extends Omit<RuleDefinitionTypeOptions, keyof CustomRuleTypeDefinitions>, Options extends Partial<CustomRuleTypeDefinitions>> = RuleDefinition<LanguageSpecificOptions & Required<Options & Omit<CustomRuleTypeDefinitions, keyof Options>>>;
679
701
  /**
680
702
  * The human readable severity level used in a configuration.
681
703
  */
@@ -801,7 +823,7 @@ interface ConfigObject<Rules extends RulesConfig = RulesConfig> {
801
823
  * An object containing name-value pairs of information that should be
802
824
  * available to all rules.
803
825
  */
804
- settings?: Record<string, unknown>;
826
+ settings?: SettingsConfig;
805
827
  }
806
828
  /** @deprecated Only supported in legacy eslintrc config format. */
807
829
  type GlobalAccess = boolean | "off" | "readable" | "readonly" | "writable" | "writeable";
@@ -864,7 +886,6 @@ interface JavaScriptParserOptionsConfig {
864
886
  globalReturn?: boolean | undefined;
865
887
  impliedStrict?: boolean | undefined;
866
888
  jsx?: boolean | undefined;
867
- experimentalObjectRestSpread?: boolean | undefined;
868
889
  [key: string]: any;
869
890
  } | undefined;
870
891
  [key: string]: any;
@@ -1059,7 +1080,7 @@ interface Language<Options extends LanguageTypeOptions = {
1059
1080
  /**
1060
1081
  * Default language options. User-defined options are merged with this object.
1061
1082
  */
1062
- defaultLanguageOptions?: LanguageOptions;
1083
+ defaultLanguageOptions?: Options["LangOptions"];
1063
1084
  /**
1064
1085
  * Validates languageOptions for this language.
1065
1086
  */
@@ -1333,4 +1354,4 @@ interface Directive {
1333
1354
  justification?: string;
1334
1355
  }
1335
1356
  //#endregion
1336
- export { Severity as A, ViolationMessage as B, RuleDefinition as C, RuleVisitor as D, RuleTextEditor as E, SuggestedEditBase as F, ViolationReportBase as H, SuggestionMessage as I, TextSourceCode as L, SeverityName as M, SourceRange as N, RulesConfig as O, SuggestedEdit as P, TraversalStep as R, RuleContext as S, RuleTextEdit as T, ViolationReport as V, ObjectMetaProperties as _, EcmaVersion as a, ProcessorFile as b, GlobalsConfig as c, JavaScriptSourceType as d, LanguageOptions as f, LinterOptionsConfig as g, LintSuggestion as h, DeprecatedInfo as i, SeverityLevel as j, RulesMeta as k, HasRules as l, LintMessage as m, ConfigObject as n, EnvironmentConfig as o, LegacyConfigObject as p, ConfigOverride as r, GlobalAccess as s, BaseConfig as t, JavaScriptParserOptionsConfig as u, Plugin as v, RuleFixer as w, RuleConfig as x, Processor as y, ViolationLocation as z };
1357
+ export { Severity as A, ViolationMessage as B, RuleDefinition as C, RuleVisitor as D, RuleTextEditor as E, SuggestedEditBase as F, ViolationReportBase as H, SuggestionMessage as I, TextSourceCode as L, SeverityName as M, SourceRange as N, RulesConfig as O, SuggestedEdit as P, TraversalStep as R, RuleContext as S, RuleTextEdit as T, types_d_exports as U, ViolationReport as V, ObjectMetaProperties as _, EcmaVersion as a, ProcessorFile as b, GlobalsConfig as c, LanguageOptions as d, LegacyConfigObject as f, MessagePlaceholderData as g, LinterOptionsConfig as h, DeprecatedInfo as i, SeverityLevel as j, RulesMeta as k, HasRules as l, LintSuggestion as m, ConfigObject as n, EnvironmentConfig as o, LintMessage as p, ConfigOverride as r, GlobalAccess as s, BaseConfig as t, JavaScriptSourceType as u, Plugin as v, RuleFixer as w, RuleConfig as x, Processor as y, ViolationLocation as z };
package/package.json CHANGED
@@ -1,15 +1,19 @@
1
1
  {
2
2
  "name": "eslint-cli-bundle",
3
- "version": "1.0.5",
3
+ "version": "2.0.1",
4
4
  "description": "Bundled version of eslint",
5
5
  "author": "silverwind",
6
- "repository": "silverwind/eslint-cli-bundle",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/silverwind/eslint-cli-bundle.git"
9
+ },
7
10
  "license": "BSD-2-Clause",
8
11
  "bin": {
9
12
  "eslint": "dist/eslint.js",
10
13
  "eslint-cli-bundle": "dist/eslint.js"
11
14
  },
12
15
  "type": "module",
16
+ "sideEffects": false,
13
17
  "files": [
14
18
  "dist"
15
19
  ],
@@ -25,17 +29,22 @@
25
29
  "./package.json": "./package.json"
26
30
  },
27
31
  "engines": {
28
- "node": ">=20"
32
+ "node": "^20.19.0 || ^22.13.0 || >=24"
29
33
  },
30
34
  "devDependencies": {
31
- "eslint": "9.39.2",
32
- "eslint-config-silverwind": "118.0.1",
35
+ "@eslint/config-helpers": "0.7.0",
36
+ "@typescript/native-preview": "7.0.0-dev.20260707.2",
37
+ "eslint": "10.11.0",
38
+ "eslint-config-silverwind": "151.0.0",
39
+ "jest-extended": "7.0.0",
40
+ "jiti": "2.7.0",
33
41
  "patch-package": "8.0.1",
34
- "tsdown": "0.20.1",
35
- "tsdown-config-silverwind": "1.7.3",
36
- "typescript": "5.9.3",
37
- "typescript-config-silverwind": "14.0.0",
38
- "updates": "17.0.8",
39
- "versions": "14.0.3"
42
+ "tsdown": "0.23.0",
43
+ "tsdown-config-silverwind": "4.1.1",
44
+ "typescript": "6.0.3",
45
+ "typescript-config-silverwind": "21.0.0",
46
+ "updates": "19.0.0",
47
+ "updates-config-silverwind": "4.0.6",
48
+ "versions": "15.5.0"
40
49
  }
41
- }
50
+ }
@@ -1 +0,0 @@
1
- import{createRequire as e}from"node:module";var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(e&&(t=e(e=0)),t),c=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),l=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},u=(e,r,i)=>(i=e==null?{}:t(a(e)),l(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e)),d=e(import.meta.url);export{u as i,s as n,d as r,c as t};